-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReasonPhrase not returned properly #64
Comments
@pantelisk73 At the moment, you can read the content body to get the same result, but this is indeed a bug vs. what HttpClient does (though I'd argue that HttpClient is wrong, as many APIs return JSON on error) |
The body unfortunately contains some random message... The page cannot be displayed because an internal server error has occurred. Which is not what the server returns as the reason phrase. :( Any chance of getting this fixed. I was using 1.2.1 and it must have worked then. Seems to have broken in 2.0.1 |
Oh wait, you're right - I misread a blog post that described where ReasonPhrase came from. I would certainly take a PR to fix this |
Any idea when? |
Whenever you write it :) |
Never ask for ETA's on OSS. Whenever you do that the release date is shoved back further just to teach you. |
var ret = new HttpResponseMessage((HttpStatusCode)resp.Code());
ret.ReasonPhrase = resp.Message(); in OkHttpNetworkHandler, AFAICT fixes it or worksforme. |
Sadly the issue still exists in the iOS version :( |
I have a ASP.NET MVC service that is returning an HttpStatusResult of 500 with a custom error phrase (Invalid User Name to be exact). When I use the NativeMessageHandler, the ReasonPhrase property of the HttpResponseMessage always shows "Internal Server Error" and never my status description.
If I comment out the use of the NativeMessageHandler, the vanilla handler that comes with the HttpClient does return the correct status description (as sent from the server).
Please advise :(
The text was updated successfully, but these errors were encountered: