kluck
05/09/2019, 8:17 AMResponse removed from my signature, I still get an IO<Any?> 🤔
fun <DTO> IO<DTO>.withToken(accessToken: IO<AccessToken>): IO<DTO> = handleErrorWith { t ->
if (t is HttpException && t.code() == 401) {
accessToken.flatMap { this@withToken.withToken(accessToken) }
} else {
raiseError<Response<DTO>>(IllegalArgumentException()).fix()
}