FunctionsApiException class

Thrown when the Edge Function responded with a non-2xx status code.

When the body is a JSON object, its message (or error) string becomes the message and its code (or error_code) string the errorCode. Otherwise the message is the reason phrase of the response.

The decoded response body is available in details, and the text it was decoded from in body. When the body stopped arriving, details is the error that cut it short and body is null.

Inheritance
Mixed-in types

Constructors

FunctionsApiException({required int statusCode, dynamic details, String? errorCode, String? requestId, Map<String, String> headers = const {}, String? body, String? message})
const

Properties

body → String?
The body of the response that caused the error, as text.
final
details → dynamic
The response body, or the originating error when no response or no body was received.
finalinherited
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
headers → Map<String, String>
The headers of the response that caused the error.
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
toString() → String
A string representation of this object.
override

Operators

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