cadence_observer_readback: name the failed read kind and HTTP status (no body).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 236506@bnt-lap001 Assistant-Session: 09087018-91e1-48c5-ab2f-acfbb62c92e4
This commit is contained in:
parent
2fb7f951eb
commit
645b529a3c
1 changed files with 4 additions and 1 deletions
|
|
@ -81,7 +81,10 @@ def read_http(origin, token, path, allowed):
|
|||
with response:
|
||||
raw = response.read(1048577)
|
||||
require(len(raw) <= 1048576, "readback_too_large")
|
||||
require(response.status == 200, "independent_readback_failed")
|
||||
# Name the read kind and HTTP status only; never the body or the token.
|
||||
kind = ("reconciliation" if path.startswith("/v1/reconciliation")
|
||||
else "stream_findings" if path == "/v1/stream-findings" else "event")
|
||||
require(response.status == 200, f"independent_readback_failed:{kind}:{response.status}")
|
||||
return json.loads(raw)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue