This commit is contained in:
jif-oai
2025-11-10 15:47:36 +00:00
parent 10c880d886
commit 9c267f0204
5 changed files with 396 additions and 28 deletions

View File

@@ -1,3 +1,4 @@
use codex_protocol::protocol::RateLimitSnapshot;
use reqwest::StatusCode;
use thiserror::Error;
@@ -17,6 +18,12 @@ pub enum Error {
},
#[error("stream error: {0}")]
Stream(String, Option<std::time::Duration>),
#[error("usage limit reached")]
UsageLimitReached {
plan_type: Option<String>,
resets_at: Option<i64>,
rate_limits: Option<RateLimitSnapshot>,
},
#[error("unexpected status {status}: {body}")]
UnexpectedStatus { status: StatusCode, body: String },
#[error("retry limit reached {status:?} request_id={request_id:?}")]