Skip to main content

Module api_status

Module api_status 

Source
Expand description

HTTP status of a failed API request, for every tool (issues #67, #69).

  • Claude reports it as result.api_error_status, and every retry as a {"type":"system","subtype":"api_retry","error_status":401} event.
  • Codex has no structured field: the status is only in the text of its turn.failed / error events (unexpected status 401 Unauthorized: ...).

Constants§

AUTH_REFUSAL_STATUSES
Statuses that refuse the credential: retrying cannot succeed.

Functions§

api_retry_status
The HTTP status a Claude system/api_retry event reports.
auth_refusal_message
Message for a run stopped on an authentication refusal.
auth_refusal_status
The 401/403 a retry event reports: the credential is refused and every further retry fails the same way (issue #69).
codex_api_error_status
HTTP status of the Codex failure that ended the run: the last turn.failed event, or the last error event of a turn that did not complete.
http_status_from_error_text
Parse the HTTP status from a Codex error text.
last_api_retry_status
Status of the last api_retry event in the stream.
resolve_api_error_status
The run’s API error status.