Skip to content

fix: preserve Call ID when polling fails - #51

Merged
JJasonSun merged 1 commit into
mainfrom
fix/preserve-call-id-765
Oct 25, 2026
Merged

JJasonSun merged 1 commit into
mainfrom
fix/preserve-call-id-765

Conversation

@JJasonSun

Copy link
Copy Markdown
Collaborator

Summary

When a call is created but polling fails, callers can now recover the API Call ID from CalleAPIError, CalleConnectionError, or CalleTimeoutError. The original exception type, cause, and API error fields are preserved. Creation errors have no known Call ID.

create call → polling error with call_id
resume --call-id → query the existing call

The existing example accepts --call-id and prints recovery instructions without creating a replacement call. README guidance distinguishes the API ID from the Billing ID and explains recovery when no ID was received.

Refs CALLE-AI/awesome-phone-call-agents#765.

Evidence

  • Before: regression tests for polling connection errors, HTTP errors, and timeouts fail because the exception has no call_id.
  • After: all 85 tests pass, including recovery through the runnable example with exactly one POST across the failed attempt and resumed query. Authentication/rate-limit error subclasses and error details remain intact.
  • Python 3.11 validation passes: OpenAPI contract, lint, types, example compilation, public-repository hygiene, wheel/source distribution metadata and contents, and clean installs of both artifacts.
  • All call behavior was tested offline; no real calls were placed.

Merge Danger

Door: two-way. The change can be reverted without data migration.

Blast Radius: SDK. Calls wait helpers add error context; successful responses, request payloads, and retry behavior are unchanged. A package release is still required before installed SDK users receive the fix.

Checklist

  • I kept this change within the supported server SDK scope.
  • I did not add browser/client-side patterns that expose CALL-E API keys.
  • I did not include private collaboration links or unconfirmed public repository references.
  • I updated tests, examples, or docs when behavior changed.
  • I updated the changelog when the change affects package users.
  • I ran the relevant local checks.

Local checks

bash scripts/validate.sh

@JJasonSun
JJasonSun marked this pull request as ready for review October 25, 2026 06:17
@JJasonSun
JJasonSun merged commit e6103fc into main Oct 25, 2026
3 checks passed
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.

1 participant