haskell-servant / haskell-servant/servant

`NoContent` is not supported when using `Cookie` / `JWT` + custom monad

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

Description

This is a follow-up to: https://github.com/haskell-servant/servant/issues/1812

> So to summarize for future encounterers of this error message: you get this error when you have any route in your API where a handler returns `NoContent` when you try to wrap the API with cookies.

I'm opening this issue because 2 of his points are worth addressing

> I think perhaps Servant should give a more easily digestible error message here -- since we are already in compilation failure territory and the application cannot be built, it should be possible to change the specifics of the failure while still preserving it as a compiler error. Could Servant define an instance covering this situation, but with a more helpful error message for newcomers?

> I think at least we need to make it much more explicit in the documentation that using `Cookie`, or anything that introduces `Cookie`, like `JWT`, means you must eliminate `NoContent` responses from your API.

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.