Http module

not_found

procedure · 1 overloadSource

An Http_Error with status 404, for when there is nothing at the requested resource. format and args make the detail text as tprint does, in the temporary allocator.

Example
error := not_found("No user %", 7);

assert(error.status == 404);
assert(error.title == "Not Found");
assert(error.detail == "No user 7");

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

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

An Http_Error with status 404, for when there is nothing at the requested resource. format and args make the detail text as tprint does, in the temporary allocator.

Parameters

format := ""
args: ..Any

Returns

Example
error := not_found("No user %", 7);

assert(error.status == 404);
assert(error.title == "Not Found");
assert(error.detail == "No user 7");

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

See also