ServerException class

5xx — the API failed to serve the request.

Inheritance
Implementers

Constructors

ServerException(String message, {int statusCode = 500, String? code, Object? body, Map<String, String> headers = const {}, String? url})
Creates a 5xx exception.
const

Properties

body → Object?
The parsed response body, or null when it could not be decoded.
finalinherited
code → String?
The API's machine-readable error code, taken from the response body's error field (for example upgrade_required), or null when absent.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
The response headers, lower-cased by the HTTP layer.
finalinherited
message → String
A human-readable message. Falls back to the HTTP reason phrase when the body carries no error code.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int
The HTTP status code of the response.
finalinherited
url → String?
The request URL, when known.
finalinherited

Methods

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

Operators

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