haskell-servant / haskell-servant/servant

ServerError: Default empty errBody to errReasonPhrase

Open
#1,235 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

Currently if one doesn't specify `errBody` when calling `err401` for example, the browser will return an empty response.

This is a very bad default since it gives a bad user experience.

I think the best thing to do would be to just use `errReasonPhrase`, although that might lead to problems with content-type mismatches. At least the error message will be in response.

The alternative is to make errBody a required field, which is backwards incompatible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.