Http module

bad_request

procedureextensionexperimentalSource

An Http_Error with status 400, for when the request is malformed or its content is invalid. format and args make the detail text as tprint does, in the temporary allocator.

Example
error := bad_request("the field % is empty", "name");
assert(error.status == 400 && error.detail == "the field name is empty");

Doesn't run in the browser (skipped on wasm).

bad_request :: (format := "", args: ..Any) -> Http_Error

Parameters

format := ""
args: ..Any

Returns

See also