[][src]Enum firestore_db_and_auth::errors::FirebaseError

pub enum FirebaseError {
    Generic(&'static str),
    UnexpectedResponse(&'static strStatusCodeStringString),
    APIError(usizeStringString),
    Request(Error),
    JWT(Error),
    JWTValidation(ValidationError),
    Ser {
        doc: Option<String>,
        ser: Error,
    },
    RSA(KeyRejected),
    IO(Error),
}

The main error type used throughout this crate. It wraps / converts from a few other error types and implements error::Error so that you can use it in any situation where the standard error type is expected.

Variants

Generic(&'static str)

Generic errors are very rarely used and only used if no other error type matches

UnexpectedResponse(&'static strStatusCodeStringString)

If the http status code is != 200 and no Google error response is attached (see https://firebase.google.com/docs/reference/rest/auth#section-error-format) then this error type will be returned

APIError(usizeStringString)

An error returned by the Firestore API - Contains the numeric code, a string code and a context. If the APIError happened on a document query or mutation, the document path will be set as context. If the APIError happens on a user_* method, the user id will be set as context. For example: 400, CREDENTIAL_TOO_OLD_LOGIN_AGAIN

Request(Error)

An error caused by the http library. This only happens if the http request is badly formatted (too big, invalid characters) or if the server did strange things (connection abort, ssl verification error).

JWT(Error)

Should not happen. If jwt encoding / decoding fails or an value cannot be extracted or a jwt is badly formatted or corrupted

JWTValidation(ValidationError)Ser

Serialisation failed

Fields of Ser

doc: Option<String>ser: Error
RSA(KeyRejected)

When the credentials.json file contains an invalid private key this error is returned

IO(Error)

Disk access errors

Trait Implementations

impl From<Error> for FirebaseError[src]

impl From<KeyRejected> for FirebaseError[src]

impl From<Error> for FirebaseError[src]

impl From<Error> for FirebaseError[src]

impl From<ValidationError> for FirebaseError[src]

impl From<Error> for FirebaseError[src]

impl Display for FirebaseError[src]

impl Debug for FirebaseError[src]

impl Error for FirebaseError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

impl<T> AsFail for T where
    T: Fail, 

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Typeable for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,