Enum fxa_client::FxaError

source ·
pub enum FxaError {
    Authentication,
    Network,
    NoExistingAuthFlow,
    WrongAuthFlow,
    Panic,
    Other,
}
Expand description

Generic error type thrown by many FirefoxAccount operations.

Precise details of the error are hidden from consumers, mostly due to limitations of how we expose this API to other languages. The type of the error indicates how the calling code should respond.

Variants§

§

Authentication

Thrown when there was a problem with the authentication status of the account, such as an expired token. The application should check its authorization status to see whether it has been disconnected, or retry the operation with a freshly-generated token.

§

Network

Thrown if an operation fails due to network access problems. The application may retry at a later time once connectivity is restored.

§

NoExistingAuthFlow

Thrown if the application attempts to complete an OAuth flow when no OAuth flow has been initiated. This may indicate a user who navigated directly to the OAuth redirect_uri for the application.

Note: This error is currently only thrown in the Swift language bindings.

§

WrongAuthFlow

Thrown if the application attempts to complete an OAuth flow, but the state tokens returned from the Firefox Account server do not match with the ones expected by the client. This may indicate a stale OAuth flow, or potentially an attempted hijacking of the flow by an attacker. The signin attempt cannot be completed.

Note: This error is currently only thrown in the Swift language bindings.

§

Panic

Thrown if there is a panic in the underlying Rust code.

Note: This error is currently only thrown in the Kotlin language bindings.

§

Other

A catch-all for other unspecified errors.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.