Skip to main content

msnp11_sdk/errors/
sdk_error.rs

1/// General errors the SDK might return.
2#[derive(Debug, thiserror::Error)]
3#[cfg_attr(feature = "uniffi", derive(uniffi::Error))]
4pub enum SdkError {
5    #[error("Could not resolve server name")]
6    ResolutionError,
7    #[error("This MSNP version is not supported by the server.")]
8    ProtocolNotSupported,
9    #[error("Authentication error. Check your email and password.")]
10    ServerIsBusy,
11    #[error("Server returned an error while logging in")]
12    ServerError,
13    #[error("Authentication error. Check your email and password.")]
14    AuthenticationHeaderNotFound,
15    #[error("Authentication error. Check your email and password.")]
16    CouldNotGetAuthenticationString,
17    #[error("An invalid argument was sent")]
18    InvalidArgument,
19    #[error("Lost connection to the server")]
20    Disconnected,
21    #[error("Error receiving data")]
22    ReceivingError,
23    #[error("Error transmitting data")]
24    TransmittingError,
25    #[error("Could not connect to the server")]
26    CouldNotConnectToServer,
27    #[error("Could not create runtime")]
28    CouldNotCreateRuntime,
29    #[error("Could not write user data")]
30    CouldNotSetUserData,
31    #[error("Please log in before using this command")]
32    NotLoggedIn,
33    #[error("Command refers to an invalid contact")]
34    InvalidContact,
35    #[error("The contact you're trying to invite is offline")]
36    ContactIsOffline,
37    #[cfg(feature = "config")]
38    #[error("Error requesting config file")]
39    ConfigRequestError,
40}