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

Reconcile use of handleException vs. logError for server side exception handling. #425

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

lbwexler
Copy link
Member

@lbwexler lbwexler commented Dec 2, 2024

We use both handleException and logError on the server. But the former provides additional services (e.g. sanitization, recognition of "RoutineExceptions" and other conventions). That logic should be used generally when logging our exceptions

Not sure how we want to do this syntactically -- integrate the use of ExceptionHandler into 'logSupport.logError'? Favor the use of xhExceptionHandler.handleException? Or write a new service method BaseService.logException that will call the latter in a more streamlined way?

@lbwexler lbwexler requested a review from amcclain December 2, 2024 13:36
@lbwexler lbwexler marked this pull request as draft December 2, 2024 14:03
@lbwexler lbwexler changed the title Cleanup to RestController to use HandleException Reconcile use of handleException vs. logError for server side exception handling. Dec 2, 2024
@lbwexler lbwexler marked this pull request as ready for review January 14, 2025 22:22
@lbwexler
Copy link
Member Author

Going to merge this simple fix to close this ticket.

@lbwexler lbwexler merged commit 498f0c1 into develop Jan 14, 2025
4 checks passed
@lbwexler lbwexler deleted the handleValidationException branch January 14, 2025 22:38
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.

ExceptionHandler should auto-wrap Grails ValidationException to get human-readable message
1 participant