Asserts an error status (soft), disposes the response, and optionally checks the error body against a schema.
the response to check
the expected HTTP status, e.g. 404
optional checks on the error body
Optional
schema name for the error body, e.g. "errors/error"
"errors/error"
the body: parsed JSON if it is JSON, otherwise the raw text
await errorCheck(await Posts.getPost("does-not-exist"), 404); Copy
await errorCheck(await Posts.getPost("does-not-exist"), 404);
Asserts an error status (soft), disposes the response, and optionally checks the error body against a schema.