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

Allow overriding the Http.Error type #74

Merged
merged 4 commits into from
Jan 14, 2024

Conversation

sandydoo
Copy link
Contributor

We commonly design APIs that return error messages in the response body together with an error status code. The BadStatus constructor in Http.Error doesn't provide the response body anymore. To access these messages, we're then forced to roll our own error type as suggested by the Elm docs.

To make this work with elm-servant, we need to be able to configure:

  1. The error type for HTTP requests (Http.Error)
  2. The expect-style functions that interpret the response body (Http.expectJson and Http.expectString).

@domenkozar domenkozar merged commit b16ed7d into haskell-servant:master Jan 14, 2024
1 check passed
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.

2 participants