Skip to content

Conversation

@tombruijn
Copy link
Member

Add error with cause route to Java app

Make testing with an error cause more easy by adding a route for this.

Configure custom error handler route for Spring

In spring, error get automatically forwarded to the /error route. This is a route we test against and would only work if you access it through curl directly for some reason.

Remap the route to /error-handler, a route that doesn't exist on purpose, so that calling another route like /error_with_cause doesn't also trigger the error in the /error route.

[skip review]

Make testing with an error cause more easy by adding a route for this.
In spring, error get automatically forwarded to the `/error` route. This
is a route we test against and would only work if you access it through
`curl` directly for some reason.

Remap the route to `/error-handler`, a route that doesn't exist on
purpose, so that calling another route like `/error_with_cause` doesn't
also trigger the error in the `/error` route.
@tombruijn tombruijn self-assigned this Aug 8, 2025
@tombruijn tombruijn added the chore A small task that takes a day or two at the most. label Aug 8, 2025
@tombruijn tombruijn merged commit 7b9bccd into main Aug 8, 2025
70 checks passed
@tombruijn tombruijn deleted the java-spring-boot-error-handler branch August 8, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A small task that takes a day or two at the most.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant