Expand description
Error taxonomy used across the crate.
Errors surfaced to clients are modelled as MostroError, which is split
into two branches:
MostroError::MostroCantDo— a “soft” error: the request was well-formed but the server refuses to perform the action (e.g. the order is not in the right state). Clients should surface the innerCantDoReasonto the user.MostroError::MostroInternalErr— a “hard” error: something went wrong while processing the request (database failure, Nostr relay issue, malformed invoice, etc.). The innerServiceErrorcarries the diagnostic detail.
Both inner enums implement Display with
human-readable messages suited for logging.
Enums§
- Cant
DoReason - Machine-readable reasons carried by a
CantDoresponse. - Mostro
Error - Top-level error type returned by the Mostro API surface.
- Service
Error - Internal errors raised by services behind the Mostro API.