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

Clean Controllers by Removing Try-Catch Blocks and Exceptions Handling #51

Closed
Dynavy opened this issue Mar 12, 2025 · 0 comments · Fixed by #59
Closed

Clean Controllers by Removing Try-Catch Blocks and Exceptions Handling #51

Dynavy opened this issue Mar 12, 2025 · 0 comments · Fixed by #59
Assignees
Labels
⬅️BACKEND 💹enhancement Improvements or adjustments features. 🛠️refactor Code improvements without changing functionality.

Comments

@Dynavy
Copy link
Collaborator

Dynavy commented Mar 12, 2025

Description:

  • Refactor the AuthController and UserController to remove all try-catch blocks and exception handling.

  • Ensure that exceptions are now handled by the GlobalExceptionHandler instead of being caught directly in the controllers.

Expected Outcome:

  • The controllers should no longer have try-catch blocks or custom exception handling logic.

  • Exceptions should be handled globally by the GlobalExceptionHandler throug the AuthService and UserService.

@Dynavy Dynavy added ⬅️BACKEND 💹enhancement Improvements or adjustments features. 🛠️refactor Code improvements without changing functionality. labels Mar 12, 2025
@Dynavy Dynavy self-assigned this Mar 12, 2025
@poksyy poksyy moved this to Backlog in COPAY - Sprint 1 Mar 12, 2025
Dynavy added a commit that referenced this issue Mar 13, 2025
- Removed all try-catch blocks and exception handling from AuthController and UserController (#51).

- Introduced UserResponseDTO to return structured JSON responses in UserController (#55).

- Updated user registration to return a formatted UserResponseDTO with relevant user details.

- Applied UserRegisterRequest DTO validation in UserController (#53).

This refactor improves code clarity, centralizes exception handling, and enhances response consistency.
@Dynavy Dynavy linked a pull request Mar 13, 2025 that will close this issue
@github-project-automation github-project-automation bot moved this from Backlog to Done in COPAY - Sprint 1 Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬅️BACKEND 💹enhancement Improvements or adjustments features. 🛠️refactor Code improvements without changing functionality.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant