Make clear error codes are from HTTP

This commit is contained in:
len 2016-12-26 18:12:15 +01:00
parent 77b4de3941
commit dc882b4dce

View file

@ -50,7 +50,7 @@ fun Call.asObservableSuccess(): Observable<Response> {
return asObservable().doOnNext { response ->
if (!response.isSuccessful) {
response.close()
throw Exception("Unsuccessful code ${response.code()}")
throw Exception("HTTP error ${response.code()}")
}
}
}