Fix/sentry cleanup again#253
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR introduces HTTP error classification helpers to distinguish authentication and transient errors across services, applies them in CouchDB and permissions services with structured retry logging and differentiated log levels, and adds configurable Sentry transaction tracing via environment variable with validation. ChangesHTTP error classification and service retry handling
Sentry transaction traces sample rate configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/common/http-error-classification.ts`:
- Around line 42-44: The code builds a detail string using
JSON.stringify(response) which can throw on non-serializable payloads; wrap the
serialization in a try/catch inside the function that computes detail (the code
around response and err.getStatus(), used by isLikelyTransientError()), and on
failure fall back to a safe representation (e.g., use util.inspect(response,
{depth: null}) or response?.toString() or a literal like '[unserializable
response]'); ensure the catch does not rethrow and the final returned string
uses that fallback detail and still calls err.getStatus().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5ffee215-a46d-4d61-9546-3d3673ac4de8
📒 Files selected for processing (10)
.env.templateREADME.mdsrc/common/http-error-classification.spec.tssrc/common/http-error-classification.tssrc/config/app.yamlsrc/couchdb/document-changes.service.spec.tssrc/couchdb/document-changes.service.tssrc/permissions/rules/rules.service.spec.tssrc/permissions/rules/rules.service.tssrc/sentry.configuration.ts
b13689d to
0c6e6f7
Compare
Summary by CodeRabbit
New Features
Improvements
Documentation
Tests