Skip to main content

Module errors

Module errors 

Source
Expand description

The errors of a service that the core tells apart: an HTTP error (401 says « reconnect the account »), a refusal that asking again would not change. They cross the protocol as codes (escouade_plugin_protocol::code) and come back as these very types in the core (plugins::adapters), so that a client in a plugin and one in the core fail alike.

Structs§

HttpError
A service’s answer other than a success: its status, and what http_error_in says of it (the error’s text).
Refused
A refusal that asking again would not change (no transition leads from where the issue is to the state).

Functions§

first_line
The first line that says something, cut to 200 bytes.
http_error_in
What name answering status with body means, in lang.
said
The message of an error’s body: Jira’s errorMessages or errors, the first of GraphQL’s errors, GitHub’s message, ClickUp’s err, or a text’s first line; none for a page of HTML.
truncate
At most max bytes, an ellipsis after when cut.