Skip to content

TEL-1026: Utility for extracting transfer error details from error- #999 - #808

Open
genseric-ghiro wants to merge 4 commits into
mainfrom
genseric/tel-912-transfer-error-details
Open

TEL-1026: Utility for extracting transfer error details from error- #999#808
genseric-ghiro wants to merge 4 commits into
mainfrom
genseric/tel-912-transfer-error-details

Conversation

@genseric-ghiro

@genseric-ghiro genseric-ghiro commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adding utility for extracting transfer error details from error

Surface sip_transfer_reason / sip_transfer_id from the error metadata, and
wrap transfer failures that carry no SIP status (ringing timeout, terminated
subscription) as SipCallError too.
@genseric-ghiro genseric-ghiro self-assigned this Sep 8, 2026
@genseric-ghiro
genseric-ghiro marked this pull request as ready for review September 11, 2026 20:58
@genseric-ghiro
genseric-ghiro requested a review from a team September 11, 2026 20:58

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@xianshijing-lk xianshijing-lk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two questions or nits,

Lgtm assuming you will be addressing them

parts.append(f"{code} {reason}" if reason else str(code))
what = "SIP transfer failed" if transfer_reason is not None else "SIP call failed"
result = f"{what}: {', '.join(parts)} ({self.code})"
extra = {k: v for k, v in self.metadata.items() if k not in _SIP_META_KEYS}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curiously, is there any specific reason that we want to filter out sip_transfer_id from the logs here ?

Is it intentional ?

assert err.sip_transfer_id == "STR_abc"
# No SIP response was involved in this failure.
assert err.sip_status_code is None
assert "STR_RINGING_TIMEOUT" in str(err)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curiously, should we also do
assert "STR_abc" in str(err)

In case "STR_abc" should be in the error str ?

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.

2 participants