-
Notifications
You must be signed in to change notification settings - Fork 709
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
Always try to parse response if SetResult has been called #240
Comments
@pborzenkov Thank you for reporting an issue. I will have a look and get back to you. |
@pborzenkov This I will take it up for |
@pborzenkov I have written a small test case for the scenario you have described. I didn't see any errors (This is the upcoming v2 branch, notably this particular part should be the same as v1).
Could you please have a look this 01e423c? Let me know what you're trying to explain. If possible provide an example or test case to demonstrate. |
That's exactly what I was talking about. I'd have expected the |
@pborzenkov Currently resty have ExpectContentType and I have added new method Does it satisfy your use case, can you please check, let me know? |
@jeevatkm Yes, it does satisfy the describe use case. Thanks! |
@pborzenkov wow, quick response, appreciated. Sorry for the delay! |
It's possible to get a 200 OK response with HTML contents from a JSON endpoint due to faulty backend configuration (e.g. a problem in API gateway, etc.).
Since resty only parses response if content type is JSON or XML the call won't return an error. Such errors could be hard to debug.
I suggest to fix the default behaviour and always parse response if SetResult has been called.
The text was updated successfully, but these errors were encountered: