mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Separate Codex error details from retry metadata (#34996)
## What changed - Wrap `CodexErrorDetails` and an optional retry delay in `CodexErr`, allowing any mapped error to preserve server-provided retry timing. - Generate the payload-free `CodexErrKind` classification alongside the error details and reuse it for analytics. - Update error handling sites to inspect `CodexErr::details()` while preserving existing display, debug, protocol mapping, and retryability behavior. ## Testing - Add coverage for legacy debug formatting, error-specific retryability, and retry-delay propagation through API error mapping. GitOrigin-RevId: d3ab8a305f2a2ee21d0c0a8c8c388b06dda9c59a
This commit is contained in:
1 parent
265cd2e100
commit
7bafdada8b
40 files changed
+741
-435
No files matched your search
@@ -20,10 +20,7 @@ async fn sampling_retry_logs_stream_error_context() {
|
||||
log_retry(
|
||||
ResponsesStreamRequest::Sampling,
|
||||
&turn_context,
|
||||
&CodexErr::Stream(
|
||||
"websocket closed by server before response.completed".to_string(),
|
||||
None,
|
||||
),
|
||||
&CodexErr::Stream("websocket closed by server before response.completed".to_string()),
|
||||
/*retries*/ 2,
|
||||
/*max_retries*/ 5,
|
||||
Duration::from_secs(1),
|
||||
|
||||
Reference in new issue
Block a user