-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
complexity:mediumLess than 1 dayLess than 1 daylang:phpPHP/LaravelPHP/Laravelpriority:lowBacklogBacklogtype:refactorCode improvement without behaviour changeCode improvement without behaviour change
Description
Parent audit: #51
Finding
The framework uses generic exceptions (RuntimeException, InvalidArgumentException) instead of domain-specific exceptions, making error handling imprecise and catch blocks overly broad.
Fix
Implement a custom exception hierarchy with a base CoreException, then domain-specific exceptions (ModuleException, TenantException, ConfigException, etc.) that extend it.
Acceptance Criteria
- Base
CoreExceptionclass created - Domain-specific exceptions extend CoreException
- At minimum: ModuleException, ConfigException, ValidationException
- Each exception includes contextual data (module name, config key, etc.)
- Existing generic exception throws replaced with specific ones
- Exception handler maps custom exceptions to appropriate HTTP codes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
complexity:mediumLess than 1 dayLess than 1 daylang:phpPHP/LaravelPHP/Laravelpriority:lowBacklogBacklogtype:refactorCode improvement without behaviour changeCode improvement without behaviour change