Feature: fix audit log 405 status#76
Conversation
…s (405, 404) When Echo returns an *echo.HTTPError (e.g. 405 Method Not Allowed) without committing the response, the audit log middleware was reading the default status 200 from c.Response().Status. Now checks Response.Committed and extracts the status from the error when the response hasn't been written yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughRemoved a local Claude permissions file and added a .gitignore rule; updated audit-log middleware to determine status codes from uncommitted Echo HTTP errors; added an end-to-end test asserting 405 is logged for wrong HTTP method. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.gitignore:
- Around line 28-30: The .gitignore entry for the Claude settings is missing a
leading slash; update the entry ".claude/settings.local.json" to
"/.claude/settings.local.json" so it consistently and precisely matches the
repository root-level .claude directory (maintaining the same style as other
root entries like "/.env" and "/opencode.json").
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Bug Fixes
Tests
Chores