chore(codex): identify failing request stage (#4929)
This commit is contained in:
@@ -294,9 +294,10 @@ async def test_codex_timeout_error_writes_diagnostic_log(monkeypatch) -> None:
|
||||
)
|
||||
assert log_capture.calls == [
|
||||
(
|
||||
"Codex API request failed: type={} kind={} retryable={} status={} "
|
||||
"Codex API request failed: stage={} type={} kind={} retryable={} status={} "
|
||||
"error_type={} error_code={} retry_after={} summary={}",
|
||||
(
|
||||
"codex_request",
|
||||
"ReadTimeout",
|
||||
"timeout",
|
||||
True,
|
||||
@@ -414,9 +415,10 @@ async def test_codex_http_diagnostic_log_omits_raw_body(monkeypatch) -> None:
|
||||
assert response.content == "Error calling Codex (CodexHTTPError): HTTP 500: Codex API request failed"
|
||||
assert log_capture.calls == [
|
||||
(
|
||||
"Codex API request failed: type={} kind={} retryable={} status={} "
|
||||
"Codex API request failed: stage={} type={} kind={} retryable={} status={} "
|
||||
"error_type={} error_code={} retry_after={} summary={}",
|
||||
(
|
||||
"codex_request",
|
||||
"CodexHTTPError",
|
||||
"http",
|
||||
True,
|
||||
|
||||
Reference in New Issue
Block a user