mirror of
https://github.com/openai/codex.git
synced 2026-04-26 07:35:29 +00:00
fix(codex-api): treat invalid_prompt as non-retryable (#9400)
**Goal**: Prevent response.failed events with `invalid_prompt` from being treated as retryable errors so the UI shows the actual error message instead of continually retrying. **Before**: Codex would continue to retry despite the prompt being marked as disallowed **After**: Codex will stop retrying once prompt is marked disallowed
This commit is contained in:
@@ -25,6 +25,8 @@ pub enum ApiError {
|
||||
},
|
||||
#[error("rate limit: {0}")]
|
||||
RateLimit(String),
|
||||
#[error("invalid request: {message}")]
|
||||
InvalidRequest { message: String },
|
||||
}
|
||||
|
||||
impl From<RateLimitError> for ApiError {
|
||||
|
||||
Reference in New Issue
Block a user