Skip to content
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

Update the stack.yaml with an fixed version of servant-client. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdepillabout
Copy link

@cdepillabout cdepillabout commented Jul 16, 2018

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?

$ stack build --fast && stack exec sce
Right (ErrEnvelope (Identity BadReq))

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant