Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marsbergen opened this issue Jul 30, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@marsbergen
Copy link
Contributor

marsbergen commented Jul 30, 2024

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.
@marsbergen marsbergen added bug Something isn't working good first issue Good for newcomers labels Jul 30, 2024
@infowijs infowijs locked and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant