haskell-servant / haskell-servant/servant
Add helpful error messages for 4xx HTTP errors
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
One idea (see https://github.com/haskell-servant/servant/pull/767#discussion_r121899006) is to use `Summary`/`Synopsis` and `Description` combinators to tell client more about API he's using.
As @phadej suggests, we'd need to update `Delayed` for this to become possible.
It would be also very nice to have a specific reason of failure (e.g. which parameter(s) failed to parse).
I think we can implement this in routing mechanism, but perhaps moving this to `HasServer` would be better.
We can always strip these messages with WAI middleware (e.g. to save traffic or to hide this "debug" info). It's unclear to me whether we need more fine-grained control here.
Contributor guide
Assessment
This issue has not been assessed yet.