pub enum CodexErrorInfo {
Show 23 variants
ContextWindowExceeded,
SessionBudgetExceeded,
UsageLimitExceeded,
RateLimitExceeded,
FlexUnavailable,
ServerOverloaded,
ModelNotFound,
PolicyCapacityUnavailable,
CyberPolicy,
MisalignmentPolicyViolation,
TooManyDenials,
InternalServerError,
Unauthorized,
BadRequest,
ThreadRollbackFailed,
SandboxError,
Other,
HttpConnectionFailed(CodexErrorInfoHttpConnectionFailed),
ResponseStreamConnectionFailed(CodexErrorInfoResponseStreamConnectionFailed),
ResponseStreamDisconnected(CodexErrorInfoResponseStreamDisconnected),
ResponseTooManyFailedAttempts(CodexErrorInfoResponseTooManyFailedAttempts),
ActiveTurnNotSteerable(CodexErrorInfoActiveTurnNotSteerable),
Unknown(Value),
}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.
Variants§
ContextWindowExceeded
SessionBudgetExceeded
UsageLimitExceeded
RateLimitExceeded
ServerOverloaded
ModelNotFound
CyberPolicy
MisalignmentPolicyViolation
TooManyDenials
InternalServerError
BadRequest
ThreadRollbackFailed
SandboxError
Other
HttpConnectionFailed(CodexErrorInfoHttpConnectionFailed)
ResponseStreamConnectionFailed(CodexErrorInfoResponseStreamConnectionFailed)
Failed to connect to the response SSE stream.
ResponseStreamDisconnected(CodexErrorInfoResponseStreamDisconnected)
The response SSE stream disconnected in the middle of a turn before completion.
ResponseTooManyFailedAttempts(CodexErrorInfoResponseTooManyFailedAttempts)
Reached the retry limit for responses.
ActiveTurnNotSteerable(CodexErrorInfoActiveTurnNotSteerable)
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.
Unknown(Value)
A value this Codex version doesn’t know, or a known one whose body didn’t decode.
Trait Implementations§
Source§impl Clone for CodexErrorInfo
impl Clone for CodexErrorInfo
Source§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
Source§impl PartialEq for CodexErrorInfo
impl PartialEq for CodexErrorInfo
Source§impl Serialize for CodexErrorInfo
impl Serialize for CodexErrorInfo
impl StructuralPartialEq for CodexErrorInfo
Auto Trait Implementations§
impl Forget for CodexErrorInfo
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