pub enum Error {
Show 16 variants
NotAuthorised,
NoUser,
ContactExists,
NoContact,
InvalidQuery,
NoData,
InvalidPayload,
CallbackTimeout,
NoSign,
BadSign,
NetworkFault,
NoRoute,
BadSerialise,
NoService,
ServiceExists,
CommFault,
}
Expand description
libqaul
service API error states
All errors that can occur in interaction with the API are encoded as variants on this enum. In most cases, no additional metadata is provided and needs to be inferred from whatever context or function call emitted the error. Check the variant doc comments for a broad overview, as well as detailed usage instructions.
§A note on language
Most variants of this enum use either an Invalid
or No
prefix. Invalid data is data that was either not expected or badly
formatted. No
in this case takes the place of Unknown
, meaning
that a query could not be fulfilled.
Variants§
NotAuthorised
Not authorised to perform this action
NoUser
The desired user was not known
ContactExists
The provided contact already exists
NoContact
The desired contact does not exist
InvalidQuery
Invalid search query
NoData
No data was returned for the provided query
InvalidPayload
Invalid payload (probably too big)
CallbackTimeout
A function callback timed out
NoSign
Signature with an unknown public key
BadSign
Fraudulent signature for a known public key
NetworkFault
A generic networking error occured
NoRoute
Failed to find a route to this user
BadSerialise
Some serialisation action failed
NoService
No such service was found
ServiceExists
A sevice with this name already exists
CommFault
Some internal components failed to communicate