-
Notifications
You must be signed in to change notification settings - Fork 68
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
Unusable error message when anything but 200 OK is returned #50
Comments
It looks like this problem originates in this method. It takes a status code and a deserialised JSON value. However, since the response body is not a JSON object, it can not be deserialised and hence The minimal change I'd propose is to change line 178 to also return the status code. The optimal change would be to change it so that the non-deserialised body content is passed to the function (or alternatively, just squeeze the raw body into a |
So the |
Yeah that'd be the preferred solution! That way it would be possible to debug errors where something went horribly wrong and you don't get JSON back 😉 |
Ok I might put up a PR and get you to check it. Give me a few minutes |
Works as expected (see PR) |
Thank you for the very quick fix! 😊 |
Haha all good - I just happened to check my notifications after you sent it. Easy fix (and something I've wanted as well). Thanks for pointing out where the change needed to go. That saved a lot of time. I'll publish this version now |
v0.24.0 is live :) |
When the Selenium Endpoint does not return a valid JSON object but instead throws some kind of error (e.g.
502 Bad Gateway
) that error code and the response body is not part of the thrown error. Instead, it containsnull
:Here is the corresponding HTTP response captured with Wireshark:
It would be neat if that error message and code would be propagated instead of discarded 🙂
The text was updated successfully, but these errors were encountered: