I keep getting ` return expression is required in ...
# arrow
h
I keep getting
return expression is required in the function of the body
error in this function
Copy code
private fun buildClient(tester: Tester1): Either<Errors.ApplicationError, AWSIot> {
    Try {
        val awsCreds = STSAssumeRoleSessionCredentialsProvider
                .Builder("test", "test").build()
        val awsIoT = AWSIotClientBuilder.standard().withCredentials(AWSStaticCredentialsProvider(awsCreds.credentials))
                .withRegion(tester.region.toLowerCase()).build()
        return Right(awsIoT)
    }.toEither().mapLeft {
        Left(Errors.UnexpectedError("Unexpected error:"))
    }
}