mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08: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:
committed by
GitHub
Unverified
parent
146d54cede
commit
93a5e0fe1c
@@ -28,6 +28,7 @@ pub(crate) fn map_api_error(err: ApiError) -> CodexErr {
|
||||
url: None,
|
||||
request_id: None,
|
||||
}),
|
||||
ApiError::InvalidRequest { message } => CodexErr::InvalidRequest(message),
|
||||
ApiError::Transport(transport) => match transport {
|
||||
TransportError::Http {
|
||||
status,
|
||||
|
||||
Reference in New Issue
Block a user