Skip to content

Add status to RetryTimeoutError#101

Draft
DevonFulcher wants to merge 4 commits intomainfrom
devonfulcher/sl-sdk-retry-timeout-status
Draft

Add status to RetryTimeoutError#101
DevonFulcher wants to merge 4 commits intomainfrom
devonfulcher/sl-sdk-retry-timeout-status

Conversation

@DevonFulcher
Copy link
Contributor

@DevonFulcher DevonFulcher commented Feb 13, 2026

Why

When the Semantic Layer SDK times out polling for query results (RetryTimeoutError), the error currently only includes timeout_s — the last known query status is lost. For agent contexts (dbt-mcp, ACA), a timeout with status COMPILED means the query finished SQL compilation and is executing against the data platform, indicating the query is too complex for agent use. Surfacing the status enables downstream consumers to make this distinction.

What

  • Added optional status: Optional[str] = None parameter to RetryTimeoutError.__init__
  • Updated __str__ to include status when present
  • Both sync and async polling clients now pass qr.status.value when raising RetryTimeoutError
  • Bumped version from 0.13.1 to 0.13.2
  • Added unit tests for the error class and polling timeout behavior

Notes

Fully backwards compatible — existing callers that don't pass status get None. Uses str (not QueryStatus enum) to avoid coupling the error module to query models.

Drafted by Claude Opus 4.6 under the direction of @DevonFulcher


Note

Low Risk
Small, backwards-compatible error/enrichment change limited to timeout exceptions and their tests; minimal risk beyond slightly different error objects/strings for consumers.

Overview
RetryTimeoutError now carries an optional status field and includes it in its string representation, so timeouts can surface the last observed query state.

Both sync and async GraphQL polling paths now pass qr.status.value when raising RetryTimeoutError, and new unit tests cover the error formatting and the timeout behavior; a changelog entry is added.

Written by Cursor Bugbot for commit a37c7a8. This will update automatically on new commits. Configure here.

DevonFulcher and others added 3 commits February 13, 2026 13:57
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't change the version on this PR. We usually bump version on release PRs that change the version number across different places.

dbtsl/error.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was kwargs introduced? We're discarding it.

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

Comments