How to catch the exception unexpected end of stream on Connection in Retrofit kotlin
I am getting the issue with retrofit when the web service is down:
java.io.IOException: unexpected end of stream on Connection{10.0.0.5:3001, proxy=DIRECT hostAddress=/10.0.0.5:3001 cipherSuite=none protocol=http/1.1}
Below is the code from my Interface API:
interface MyApi {
@FormUrlEncoded
@POST("login")
suspend fun Logearse(
@Field("email") email: String?,
@Field("password") password: String?,
@Field("typeOfOperation") typeOfOperation: String?,...