exceptions
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| CodexError codexed.exceptions Base exception for Codex adapter errors. |
||
| CodexProcessError codexed.exceptions Error starting or communicating with the Codex app-server process. |
||
| CodexRequestError codexed.exceptions Error from a Codex app-server request (JSON-RPC error response). |
||
| InternalRpcError codexed.exceptions JSON-RPC internal error (-32603). |
||
| InvalidParamsError codexed.exceptions JSON-RPC invalid params (-32602). |
||
| InvalidRequestError codexed.exceptions JSON-RPC invalid request (-32600). |
||
| MethodNotFoundError codexed.exceptions JSON-RPC method not found (-32601). |
||
| ParseError codexed.exceptions JSON-RPC parse error (-32700). |
||
| RetryLimitExceededError codexed.exceptions Server exhausted internal retry budget for a retryable operation. |
||
| ServerBusyError codexed.exceptions Server is overloaded / unavailable and caller should retry. |
||
| TransportClosedError codexed.exceptions Raised when the app-server transport closes unexpectedly. |
||
| TurnFailedError codexed.exceptions Raised when a turn completes with failed status. |
🛈 DocStrings¶
Codex adapter exceptions.
Provides a rich error hierarchy for JSON-RPC errors from the Codex app-server, with automatic classification of retryable/overload errors.
CodexError
¶
CodexProcessError
¶
Bases: CodexError
Error starting or communicating with the Codex app-server process.
CodexRequestError
¶
Bases: CodexError
Error from a Codex app-server request (JSON-RPC error response).
Source code in src/codexed/exceptions.py
InternalRpcError
¶
InvalidParamsError
¶
InvalidRequestError
¶
Bases: CodexRequestError
JSON-RPC invalid request (-32600).
Source code in src/codexed/exceptions.py
MethodNotFoundError
¶
Bases: CodexRequestError
JSON-RPC method not found (-32601).
Source code in src/codexed/exceptions.py
ParseError
¶
RetryLimitExceededError
¶
Bases: ServerBusyError
Server exhausted internal retry budget for a retryable operation.
Source code in src/codexed/exceptions.py
ServerBusyError
¶
Bases: CodexRequestError
Server is overloaded / unavailable and caller should retry.
Source code in src/codexed/exceptions.py
TransportClosedError
¶
Bases: CodexProcessError
Raised when the app-server transport closes unexpectedly.
TurnFailedError
¶
Bases: CodexError
Raised when a turn completes with failed status.
Source code in src/codexed/exceptions.py
is_retryable_error
¶
Check if an exception is a transient overload-style error worth retrying.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exc
|
BaseException
|
The exception to check. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the error is transient and the operation should be retried. |
Source code in src/codexed/exceptions.py
map_jsonrpc_error
¶
map_jsonrpc_error(code: int, message: str, data: dict[str, Any] | None = None) -> CodexRequestError
Map a raw JSON-RPC error into a typed SDK exception.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
int
|
JSON-RPC error code. |
required |
message
|
str
|
Error message from the server. |
required |
data
|
dict[str, Any] | None
|
Optional error data payload. |
None
|
Returns:
| Type | Description |
|---|---|
CodexRequestError
|
Appropriately typed CodexRequestError subclass. |