Skip to content

Add proper JSON API error response when a request is Unauthorized #19

@marsbergen

Description

@marsbergen

Context

For example when accessing /private/demo without a valid access token the default Vert.x exception handler is used. Therefor we are missing the JSON API structured error we do return when other exceptions occur.

Currently failed requests result in the following logging:

SEVERE: Unhandled exception in router
io.vertx.ext.web.handler.HttpException: Unauthorized

Technical Requirements

  • Add Vert.x failureHandler to the router which converts a standard Exception into a JSON API error response as we do for other endpoints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions