Files
codex/codex-rs/auth/error.rs
T
Ahmed IbrahimandCodex 60192f2a5f Make core auth a separate crate
- Move auth-owned source and tests into `auth` as a standalone workspace crate.
- Move `create_client` into `codex-client` and import it directly where needed.

Co-authored-by: Codex <noreply@openai.com>
2026-03-19 12:55:20 -07:00

26 lines
542 B
Rust

use thiserror::Error;
#[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,
Revoked,
Other,
}