Skip to content

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Dec 13, 2025

No description provided.

Implements ErrorPresenterLocator interface and ModuleErrorPresenterLocator
class that routes error presenter requests to module-specific error
presenters based on configurable patterns.

Configuration example:
  'Front:*' => 'Front:Error'
  'Admin:*' => 'Admin:Error'

This allows different modules to have their own error presenters,
enabling customized error handling per module (e.g., different
error pages for frontend vs admin sections).

Closes #4
- Add Admin/ErrorPresenter fixture for admin module errors
- Add Front/ErrorPresenter fixture for frontend module errors
- Add DefaultErrorPresenter fixture as fallback
- Add ModuleErrorPresenterRoutingTest with comprehensive test cases
  demonstrating real-world usage scenarios
- Add Front:Homepage and Front:Article presenters that throw errors
- Add Admin:Dashboard and Admin:User presenters that throw errors
- Add ApplicationErrorHandlingTest that simulates real application run:
  - Presenters throw RuntimeException/BadRequestException
  - ModuleErrorPresenterLocator routes to correct error presenter
  - Validates error presenter response contains expected error message
  - Tests full error handling flow with request parameters preserved
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.

3 participants