Function: errorBodyProblem()
function errorBodyProblem(body): string | null;
Defined in: packages/testing/src/rsp-conformance.ts:144
docs/10 §1.4: every non-2xx body is { error: { code, message, … } } with a
snake_case wire code. Returns the reason a body fails, or null.
A string rather than a boolean because the failure message is the whole value
of this check: "the error body is wrong" sends an implementer looking through
a whole handler; "error.code is Not Found, expected snake_case" does not.
Parameters
| Parameter | Type |
|---|---|
body | unknown |
Returns
string | null