Skip to main content

Module error

Module error 

Source
Expand description

Maps the errors of the protocol layer ([AlorApiError]) to the public [brokapi_core::Error].

There are two mappings, and the difference matters. map_err is for reads. map_command_err is for commands that change the account, where “no answer” must never look like “nothing happened”.

Functions§

map_command_err
A command that failed: only answers that prove the broker did not act become definite errors. No answer, a break, HTTP 5xx or an unreadable answer may have reached the broker: Error::Unknown, never retried by the library.
map_config_err
Maps a failure to build a client from the configuration to [Error::Config], with the text of the original error.
map_err
Maps a failed read (or a failed step before a command was sent) to a public error.