ElyAuthException class

Exception thrown during Ely.by authentication operations

Contains specific error codes and messages to help diagnose authentication issues.

Common error codes:

  • invalid_client - Invalid client ID or secret
  • invalid_grant - Invalid authorization code or refresh token
  • access_denied - User denied access during OAuth flow
  • BrowserLaunchFailed - Cannot open browser for authentication
  • AuthTimeout - User didn't complete authentication within timeout
  • StateMismatch - OAuth state parameter validation failed
  • TwoFactorRequired - Account requires two-factor authentication

Example:

try {
  final result = await ElyAuth.authenticateWithOAuth(config);
} catch (e) {
  if (e is ElyAuthException) {
    switch (e.error) {
      case 'access_denied':
        print('User cancelled authentication');
        break;
      case 'invalid_client':
        print('Check your client ID and secret');
        break;
      default:
        print('Authentication error: ${e.errorMessage}');
    }
  }
}
Implemented types

Constructors

ElyAuthException.new(String error, String errorMessage)
Creates an authentication exception with error code and message

Properties

error String
Specific error code identifying the type of authentication failure
final
errorMessage String
Human-readable error message describing the failure
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited