Android Question [SOLVED] Sanity Check: OkHttp_ResponseError and StatusCode=200 at same time?

Sandman

Expert
Licensed User
Longtime User
I have a few users seeing a rare error that I have never seen myself when testing my app, so I'm working my way through the source to figure out what's happening. And now I have to ask a control question to the forum:

In OkHttp, is it possible to enter ResponseError, and at the same time have the StatusCode be 200?

If so, what could cause that?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Why are you using OkHttp instead of OkHttpUtils2?

In OkHttp, is it possible to enter ResponseError, and at the same time have the StatusCode be 200?
It is not possible. The StatusCode is only set for responses that were received properly and the only error possible in that case is that the response code is not 2x..
 
Upvote 0
Top