Skip to content

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

@dcastro

Description

@dcastro

This is a follow-up to: #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions