fix(hermes): Include the errorMessage JSON convention while preserving the existing precedence of error and message. This one-line change makes the failing HTTP 400 JSON payload produce the expected safe detail without broadening error handling or adding dependencies. (incident ariadne/409)
This commit is contained in:
parent
779c714058
commit
faab83b647
@ -12,7 +12,7 @@ def _runtime_error_detail(exc: Exception) -> str | None:
|
||||
|
||||
def _http_message_from_payload(payload: object) -> str | None:
|
||||
if isinstance(payload, dict):
|
||||
raw = payload.get("error") or payload.get("message")
|
||||
raw = payload.get("error") or payload.get("message") or payload.get("errorMessage")
|
||||
if isinstance(raw, str) and raw.strip():
|
||||
return raw.strip()
|
||||
if isinstance(payload, str) and payload.strip():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user