Http module

error_text

procedureextensionexperimental3 overloadsSource

A one-line description of any error, for logs and messages.

Example
assert(error_text(not_found("No user 7")) == "404 Not Found: No user 7");

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

error_text :: (error: Http_Error) -> string

Parameters

error: Http_Error

Returns

string
error_text :: (error: Serve_Error) -> string

A one-line description of why the server did not start.

Parameters

Returns

string
error_text :: (error: Client_Error) -> string

A one-line description of any client error, for logs and messages.

Parameters

Returns

string
Example
api: Client;
_, error := get(*api, "ftp://example.com/file");
assert(error_text(error).count > 0);

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

See also