Better usage errors (#1941)

<img width="771" height="279" alt="image"
src="https://github.com/user-attachments/assets/e56f967f-bcd7-49f7-8a94-3d88df68b65a"
/>
This commit is contained in:
pakrym-oai
2025-08-07 09:46:13 -07:00
committed by GitHub
parent bc28b87c7b
commit 62ed5907f9
3 changed files with 39 additions and 7 deletions

View File

@@ -62,6 +62,12 @@ pub enum CodexErr {
#[error("unexpected status {0}: {1}")]
UnexpectedStatus(StatusCode, String),
#[error("Usage limit has been reached")]
UsageLimitReached,
#[error("Usage not included with the plan")]
UsageNotIncluded,
/// Retry limit exceeded.
#[error("exceeded retry limit, last status: {0}")]
RetryLimit(StatusCode),