openai/codex · error · RefreshTokenFailedError
{message}
Error message
{message} What it means
Error "{message}" thrown in openai/codex.
Source
Thrown at codex-rs/protocol/src/auth.rs:182
matches!(
self,
Self::Team
| Self::SelfServeBusinessProLite
| Self::SelfServeBusinessUsageBased
| Self::Business
| Self::Ent26
| Self::EnterpriseCbpAutomation
| Self::EnterpriseCbpUsageBased
| Self::Enterprise
| Self::Edu
| Self::EduPlus
| Self::EduPro
)
}
}
#[derive(Debug, Clone, PartialEq, Eq, Error)]
#[error("{message}")]
pub struct RefreshTokenFailedError {
pub reason: RefreshTokenFailedReason,
pub message: String,
}
impl RefreshTokenFailedError {
pub fn new(reason: RefreshTokenFailedReason, message: impl Into<String>) -> Self {
Self {
reason,
message: message.into(),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RefreshTokenFailedReason {
Expired,
Exhausted,View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/protocol/src/auth.rs:182 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/c0970fd66bafec7a.
Report an issue: GitHub.