mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-04 07:31:58 +00:00
fix(webhook): use 403 not 500 for missing-secret rejection
Operator misconfiguration is a client/setup error, not an internal server exception. 403 "forbidden" more accurately reflects "this route refuses to authenticate" than 500 "internal server error" — the latter triggers incident alerting on operator monitoring and conflates real bugs with config drift. Follow-up tweak to PR #29629 by @m0n3r0.
This commit is contained in:
parent
dbf73e90fa
commit
15aa6884a2
2 changed files with 2 additions and 2 deletions
|
|
@ -508,7 +508,7 @@ class TestHTTPHandling:
|
|||
app = _create_app(adapter)
|
||||
async with TestClient(TestServer(app)) as cli:
|
||||
resp = await cli.post("/webhooks/test", json={"data": "value"})
|
||||
assert resp.status == 500
|
||||
assert resp.status == 403
|
||||
data = await resp.json()
|
||||
assert data["error"] == "Webhook route is missing an HMAC secret"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue