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

refactor: Improve exception handling and validation across project services #35

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

ranzyblessings
Copy link
Owner

  • Replaced IllegalArgumentException with InvalidCapitalMaximizationQueryException for clearer error semantics.
  • Introduced ProjectNotFoundException and TooManyProjectsException for better business rule enforcement.
  • Refactored addAll in ProjectService to use Flux.defer() for proper reactive error handling.
  • Improved ApiResponse documentation for consistency and clarity.
  • Enhanced logging and centralized exception handling in ProjectsApiExceptionHandler.
  • Updated test cases to reflect new exception types and messages.

These changes improve maintainability, error clarity, and overall robustness of the application.

Fixes #13

…rvices

- Replaced `IllegalArgumentException` with `InvalidCapitalMaximizationQueryException` for clearer error semantics.
- Introduced `ProjectNotFoundException` and `TooManyProjectsException` for better business rule enforcement.
- Refactored `addAll` in `ProjectService` to use `Flux.defer()` for proper reactive error handling.
- Improved `ApiResponse` documentation for consistency and clarity.
- Enhanced logging and centralized exception handling in `ProjectsApiExceptionHandler`.
- Updated test cases to reflect new exception types and messages.

These changes improve maintainability, error clarity, and overall robustness of the application.

Fixes #13
@ranzyblessings ranzyblessings merged commit 1580412 into main Feb 21, 2025
3 checks passed
@ranzyblessings ranzyblessings deleted the feat/improve-error-handling branch February 21, 2025 01:40
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.

Implement Custom Exception for Specific Error Handling
1 participant