Joe
01/27/2018, 1:28 PMclass Auth(client: IApiClient) : Logger {
private val authApi: IAuth = client.retrofit.create(IAuth::class.java)
...
suspend fun requestToken(code: String): TokenResponse {
try {
return authApi.token(code).await()
} catch (e: IllegalStateException) {
error("Error from platform:", e)
return TokenResponse(TokenResponse.Payload(), false)
}
}
}