Skip to content

Filter all exceptions when sendFullErrorException is false#4200

Closed
roumn wants to merge 1 commit intoflowable:mainfrom
roumn:exception-handler-extension
Closed

Filter all exceptions when sendFullErrorException is false#4200
roumn wants to merge 1 commit intoflowable:mainfrom
roumn:exception-handler-extension

Conversation

@roumn
Copy link
Copy Markdown
Contributor

@roumn roumn commented Apr 9, 2026

Previously, only handleBadMessageConversion and handleOtherException in BaseExceptionHandlerAdvice respected the sendFullErrorException flag. All other exception handlers (handleNotSupported, handleConflict, handleNotFound, handleForbidden, handleIllegalArgument, handleIllegalState, handleTaskAlreadyClaimed) always returned the full exception message in the response, regardless of the flag.

This change applies the same pattern consistently to all handlers: when sendFullErrorException is false, a UUID error identifier is generated and logged at WARN level, and only the error identifier is returned to the client — preventing internal error details from leaking in the REST API response.

The test class has been updated accordingly, using ${json-unit.regex} matchers to verify the error ID pattern in each handler's response.

@roumn
Copy link
Copy Markdown
Contributor Author

roumn commented Apr 9, 2026

Does not make sense, will close PR. This would break too many things.

@roumn roumn closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant