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 exception handling #20

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Add exception handling #20

merged 3 commits into from
Apr 15, 2024

Conversation

daverbk
Copy link
Collaborator

@daverbk daverbk commented Apr 14, 2024

Pull Request

Description

Added a GlobalExceptionHandler.java to handle exceptions and return a similar-styled error responses in form of ExceptionResponse.java

Related Issue

#17

Checklist

Please review and check all applicable items:

  • I have tested my changes thoroughly
  • My code follows the project's coding standards and guidelines
  • I have updated relevant tests
  • I have reviewed my changes to ensure there are no unnecessary changes
  • My pull request has a descriptive title and includes a detailed description of the changes

Additional Notes

In the future we can create more custom exceptions and handle them via GlobalExceptionHandler

ps. Exception handling related tests will be added as a separate commit to this pr (done ✅)

Screenshots

Google API-related errors

image

Our custom exception

image

@daverbk daverbk added the enhancement New feature or request label Apr 14, 2024
@daverbk daverbk requested a review from leingenm April 14, 2024 13:05
@daverbk daverbk self-assigned this Apr 14, 2024
@daverbk daverbk linked an issue Apr 14, 2024 that may be closed by this pull request
@leingenm leingenm merged commit db0480a into main Apr 15, 2024
3 checks passed
@leingenm leingenm deleted the issue-17 branch April 15, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add proper error handling
2 participants