Update the stack.yaml with an fixed version of servant-client. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for cdepillabout/servant-checked-exceptions#27.
I'm sorry that the error status functional of
servant-checked-exceptions
is not working.To be honest, I've never actually used the error status functionality with
servant-client
.I looked into this a little, and it appears that servant-client is swallowing up responses that are not 2XX:
https://github.com/haskell-servant/servant/blob/f9bcc15d0b1877187b33cbfe5fa6ef60625e17d0/servant-client/src/Servant/Client/Internal/HttpClient.hs#L172-L173
I modified servant-client to stop doing this here, and it appears that it works?
Although I'm not sure what the ramifications are of modifying servant-client like above.
Maybe servant-client's
ClientEnv
type could have a configuration option that stops servant-client from performing this check? Or maybe there is some way to fix servant-checked-exceptions to not hit this code path?If you want to open up an issue about this on the servant repo, I will provide any support necessary to get this fixed.