-
Notifications
You must be signed in to change notification settings - Fork 35
Update error handler add stack trace #188
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
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughBumps runtime to PHP 8.1 across Dockerfile, workflows, and composer. Pins Composer Docker image to 2.6 in workflows. Adds telemetry and compression to App/Response, expands HTTP status codes, and refactors routing/path handling. Extends validators (AnyOf, Domain restrictions, Host change). Updates tests and e2e server for new behaviors. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant App as App
participant Rt as Router/Route
participant H as Handlers
participant R as Response
Note over App,R: New telemetry + compression flow
C->>App: HTTP Request
App->>App: Start telemetry (activeRequests++, timers)
App->>Rt: preparePath(path), match()
Rt-->>App: Route (with matchedPath, params)
App->>H: Execute action(s)
H-->>App: Write to Response
App->>R: Configure compression (accept-encoding, thresholds)
alt Compressible and allowed
R->>R: Compress body, set headers
else No compression
R->>R: Send as-is
end
App->>App: Record metrics (duration, sizes)
R-->>C: Headers + Body
sequenceDiagram
autonumber
participant Dev as Developer
participant Rt as Router
participant Ro as Route
Note over Rt,Ro: Path preparation and param mapping
Dev->>Rt: addRoute("/databases/:db/collections/:col")
Rt->>Rt: preparePath() -> [alias, params]
Rt->>Ro: setPathParam(key, index, path)
Dev->>Rt: addRouteAlias("/db/:db/c/:col", "/databases/:db/collections/:col")
Rt->>Rt: preparePath(alias) -> [alias, params]
Rt->>Ro: setPathParam(key, index, alias)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates error handling to include stack traces in error messages when error handlers fail. The change improves debugging capabilities by providing more detailed error information.
- Added stack trace information to error messages when error handlers encounter exceptions
- Updated tests to accommodate the new error message format with stack traces
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 19 comments.
| File | Description |
|---|---|
| src/App.php | Modified error message format to include stack trace information in all error handler catch blocks |
| tests/AppTest.php | Updated test assertions to verify the new error message format includes stack trace information |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.