PostgrestApiException class

Thrown when PostgREST answered with an error.

errorCode holds the code reported by PostgREST or PostgreSQL, for example PGRST116 or the SQLSTATE 23505. It is unrelated to statusCode, which is the HTTP status of the response.

Inheritance
Mixed-in types

Constructors

PostgrestApiException({required String message, required int statusCode, String? errorCode, String? requestId, Object? details, String? hint})
const
PostgrestApiException.fromJson(Map<String, dynamic> json, {required int statusCode, String? message, String? details, String? requestId})
Builds an exception from an error response body.
factory

Properties

details → Object?
Additional details PostgREST or PostgreSQL reported about the error.
final
errorCode → String?
Identifier for the error, for example weak_password (auth), PGRST116 (postgrest) or NoSuchKey (storage).
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
A hint for resolving the error, if PostgREST or PostgreSQL reported one.
final
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
statusCode → int
HTTP status code of the response that caused the error.
final

Methods

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

Operators

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