-
Notifications
You must be signed in to change notification settings - Fork 14
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
servant-client doesn't return envelopes for non-2xx status codes #27
Comments
I have responded to this here: bergmark/sce#1. |
This also causes the example to fail: $ stack exec -- servant-checked-exceptions-example-client foobar
Got a ServantErr: FailureResponse (Response {responseStatusCode = Status {statusCode = 404, statusMessage = "Not Found"}, responseHeaders = fromList [("Transfer-Encoding","chunked"),("Date","Mon, 16 Jul 2018 02:26:30 GMT"),("Server","Warp/3.2.22"),("Content-Type","application/json;charset=utf-8")], responseHttpVersion = HTTP/1.1, responseBody = "{\"err\":\"BadSearchTermErr\"}"}) I think for now, if you want to set exception statuses to something other than http 200, servant-client is not going to work correctly. I said this on bergmark/sce#1 as well, but if someone wants to create an issue on the servant repo about this, I am willing to do the work to get servant-checked-exceptions fixed. |
Thanks a lot for digging into this! I'll file an issue upstream. |
This was also reported by @jonathanknowles in #28. |
Full reproduction: https://github.com/bergmark/sce
Using servant-0.13.1 and servant-checked-exceptions-2.0.0.0
I expected this to print the Error envelope but instead I get
If i change the ErrStatus instance to return
ok200
I get the envelope as expected:Is there something I'm missing?
The text was updated successfully, but these errors were encountered: