AccessTokenException class

Thrown when the accessToken callback a client was created with fails.

The request is not sent and not retried. An exception the callback throws that is already a SupabaseException, such as an AuthException from a failed session refresh, is thrown as is instead.

try {
  await supabase.from('countries').select();
} on AccessTokenException catch (error) {
  print('Could not get a token: ${error.cause}');
}
Inheritance

Constructors

AccessTokenException(Object cause)

Properties

cause → Object
The error the accessToken callback threw.
final
errorCode → String?
Identifier for the error, for example weak_password (auth), PGRST116 (postgrest) or NoSuchKey (storage).
finalinherited
exceptionName → String
The class name toString starts with.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
message → String
Human readable error message associated with the error.
finalinherited
requestId → String?
The identifier the Supabase gateway assigned to the request, read from the sb-request-id response header.
finalinherited
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