mirror of
https://github.com/openai/codex.git
synced 2026-05-04 21:32:21 +03:00
fix: #2606 better user experience with unrecoverable errors
This commit is contained in:
@@ -1566,7 +1566,14 @@ async fn run_turn(
|
||||
Ok(output) => return Ok(output),
|
||||
Err(CodexErr::Interrupted) => return Err(CodexErr::Interrupted),
|
||||
Err(CodexErr::EnvVar(var)) => return Err(CodexErr::EnvVar(var)),
|
||||
Err(e @ (CodexErr::UsageLimitReached(_) | CodexErr::UsageNotIncluded)) => {
|
||||
Err(
|
||||
e @ (CodexErr::UsageLimitReached(_)
|
||||
| CodexErr::UsageNotIncluded
|
||||
| CodexErr::UnexpectedStatus(_, _)
|
||||
| CodexErr::RetryLimit(_)
|
||||
| CodexErr::UnauthorizedError
|
||||
| CodexErr::InternalServerError),
|
||||
) => {
|
||||
return Err(e);
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user