-
Notifications
You must be signed in to change notification settings - Fork 13.1k
fix: unhandled exception if Drachtio fails to initiate a request #37793
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
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 9f42482 The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a changeset entry and adds explicit error handling in createDialog so Drachtio request errors are logged, trigger a server-side hangup with signaling-error, and return early to avoid crashes when SIP transport is misconfigured. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts (1)
154-180: AddcallIdtocbRequesterror log and makereqparameter optional to match defensive coding pattern.The
reqparameter is checked for truthiness at line 164 despite being typed as non-optionalSrfRequest. Given the RocketChat patch to drachtio-srf adds error handling tocbRequestwith an error parameter, defensive typing (req?: SrfRequest) is appropriate. Additionally, the error log at line 156 should includecallId: call._idfor consistency with the catch-block error logging at line 185.- cbRequest: (err: unknown, req: SrfRequest) => { + cbRequest: (err: unknown, req?: SrfRequest) => { if (err) { logger.error({ msg: 'OutgoingSipCall.createDialog - request failed', err, + callId: call._id, }); void mediaCallDirector.hangupByServer(call, 'signaling-error'); return; }
🧹 Nitpick comments (1)
.changeset/wet-papayas-buy.md (1)
1-5: Changeset looks consistent with the fix; consider adding a period (and optionally the issue key).
Not required, but it can help release notes scanning.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/wet-papayas-buy.md(1 hunks)ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: pierre-lehnen-rc
Repo: RocketChat/Rocket.Chat PR: 36718
File: packages/media-signaling/src/lib/Call.ts:633-642
Timestamp: 2025-09-23T00:27:05.438Z
Learning: In PR #36718, pierre-lehnen-rc prefers to maintain consistency with the old architecture patterns for DTMF handling rather than implementing immediate validation improvements, deferring enhancements to future work.
🧬 Code graph analysis (1)
ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts (2)
ee/packages/media-calls/src/logger.ts (1)
logger(3-3)ee/packages/media-calls/src/server/CallDirector.ts (1)
mediaCallDirector(422-422)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37793 +/- ##
===========================================
- Coverage 67.80% 67.72% -0.09%
===========================================
Files 3458 3458
Lines 113955 113953 -2
Branches 20927 20926 -1
===========================================
- Hits 77271 77175 -96
- Misses 34553 34651 +98
+ Partials 2131 2127 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Issue(s)
VGA-106
Steps to test or reproduce
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.