SupabaseException class abstract

Base class for the exceptions thrown by the Supabase client packages.

A plain SupabaseException is a failure the client raised on its own, without or before a request, such as a missing session or an unparsable JWT. A failure a service reported is a SupabaseApiException, and a request that never received a response is a SupabaseTransportException.

The auth, postgrest, storage, functions, realtime and iceberg exceptions all extend this:

try {
  await supabase.from('countries').select();
} on SupabaseException catch (error) {
  print(error.message);
}
Implemented types

Constructors

SupabaseException(String message, {String? errorCode, String? requestId})
const

Properties

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