FxaError
public enum FxaError
extension FxaError: Equatable, Hashable
extension FxaError: Foundation.LocalizedError
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.
-
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.
Declaration
Swift
case Authentication(message: String)
-
Thrown if an operation fails due to network access problems. The application may retry at a later time once connectivity is restored.
Declaration
Swift
case Network(message: String)
-
Thrown if the application attempts to complete an OAuth flow when no OAuth flow has been initiated for that state. This may indicate a user who navigated directly to the OAuth
redirect_uri
for the application.Declaration
Swift
case NoExistingAuthFlow(message: String)
-
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.
Declaration
Swift
case WrongAuthFlow(message: String)
-
Origin mismatch when handling a pairing flow
The most likely cause of this is that a user tried to pair together two firefox instances that are configured to use different servers.
Declaration
Swift
case OriginMismatch(message: String)
-
The sync scoped key was missing in the server response
Declaration
Swift
case SyncScopedKeyMissingInServerResponse(message: String)
-
Thrown if there is a panic in the underlying Rust code.
Note: This error is currently only thrown in the Kotlin language bindings.
Declaration
Swift
case Panic(message: String)
-
A catch-all for other unspecified errors.
Declaration
Swift
case Other(message: String)
-
Declaration
Swift
public var errorDescription: String? { get }