Skip to content

Custom http error handler #569

@giomf

Description

@giomf

Motivations

Currently an error thrown by a http handler gets transformed into a 500 Internal server error

  • Would you like to implement this feature? [y/n]
    With some help I could try it, yes.

Solution

It would increase the qualtiy of error handling if its possible to map specific internal errors to error codes.
By giving the possibility to register a custom error handler that maps errors like parsing errors of a json object to an 400 Bad request for example.

Alternatives

Additional context

Maybe this can help?
Also #11 goes in this direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions