Hexa
10/31/2018, 4:18 PMreturn expression is required in the function of the body
error in this function 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:"))
}
}