pub enum CodexErrorInfo {
Show 16 variants
ContextWindowExceeded,
SessionBudgetExceeded,
UsageLimitExceeded,
ServerOverloaded,
CyberPolicy,
InternalServerError,
Unauthorized,
BadRequest,
ThreadRollbackFailed,
SandboxError,
Other,
HttpConnectionFailed {
http_status_code: Option<u16>,
},
ResponseStreamConnectionFailed {
http_status_code: Option<u16>,
},
ResponseStreamDisconnected {
http_status_code: Option<u16>,
},
ResponseTooManyFailedAttempts {
http_status_code: Option<u16>,
},
ActiveTurnNotSteerable {
turn_kind: NonSteerableTurnKind,
},
}Expand description
This translation layer make sure that we expose codex error code in camel case.
When an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in httpStatusCode on the relevant codexErrorInfo variant.
JSON schema
{
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
"oneOf": [
{
"type": "string",
"enum": [
"contextWindowExceeded",
"sessionBudgetExceeded",
"usageLimitExceeded",
"serverOverloaded",
"cyberPolicy",
"internalServerError",
"unauthorized",
"badRequest",
"threadRollbackFailed",
"sandboxError",
"other"
]
},
{
"title": "HttpConnectionFailedCodexErrorInfo",
"type": "object",
"required": [
"httpConnectionFailed"
],
"properties": {
"httpConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
"description": "Failed to connect to the response SSE stream.",
"type": "object",
"required": [
"responseStreamConnectionFailed"
],
"properties": {
"responseStreamConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"title": "ResponseStreamDisconnectedCodexErrorInfo",
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
"type": "object",
"required": [
"responseStreamDisconnected"
],
"properties": {
"responseStreamDisconnected": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
"description": "Reached the retry limit for responses.",
"type": "object",
"required": [
"responseTooManyFailedAttempts"
],
"properties": {
"responseTooManyFailedAttempts": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
},
{
"title": "ActiveTurnNotSteerableCodexErrorInfo",
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
"type": "object",
"required": [
"activeTurnNotSteerable"
],
"properties": {
"activeTurnNotSteerable": {
"type": "object",
"required": [
"turnKind"
],
"properties": {
"turnKind": {
"$ref": "#/definitions/NonSteerableTurnKind"
}
}
}
},
"additionalProperties": false
}
]
}Variants§
ContextWindowExceeded
SessionBudgetExceeded
UsageLimitExceeded
ServerOverloaded
CyberPolicy
InternalServerError
BadRequest
ThreadRollbackFailed
SandboxError
Other
HttpConnectionFailed
ResponseStreamConnectionFailed
Failed to connect to the response SSE stream.
ResponseStreamDisconnected
The response SSE stream disconnected in the middle of a turn before completion.
ResponseTooManyFailedAttempts
Reached the retry limit for responses.
ActiveTurnNotSteerable
Returned when turn/start or turn/steer is submitted while the current active turn cannot accept same-turn steering, for example /review or manual /compact.
Fields
§
turn_kind: NonSteerableTurnKindTrait Implementations§
Source§impl Clone for CodexErrorInfo
impl Clone for CodexErrorInfo
Source§fn clone(&self) -> CodexErrorInfo
fn clone(&self) -> CodexErrorInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodexErrorInfo
impl Debug for CodexErrorInfo
Source§impl<'de> Deserialize<'de> for CodexErrorInfo
impl<'de> Deserialize<'de> for CodexErrorInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodexErrorInfo
impl RefUnwindSafe for CodexErrorInfo
impl Send for CodexErrorInfo
impl Sync for CodexErrorInfo
impl Unpin for CodexErrorInfo
impl UnsafeUnpin for CodexErrorInfo
impl UnwindSafe for CodexErrorInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more