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 ResourceNotFoundException, replace RuntimeExceptions #38

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

maxgreen01
Copy link
Contributor

@maxgreen01 maxgreen01 commented Jan 31, 2025

Instead of throwing bare RuntimeExceptions when a data object is not found (which throws an error with HTTP status 500), we want to throw a 404 Error. This can be done using Spring's ResponseStatusException object, which I extended into a custom ResourceNotFoundException.

closes #36

@miguel-merlin miguel-merlin merged commit 9f22fdf into main Jan 31, 2025
2 checks passed
@maxgreen01 maxgreen01 deleted the bug/404exception branch January 31, 2025 23:56
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.

Exception Handling
2 participants