ServiceException class final

Exception thrown when an API call fails.

Implemented types

Constructors

ServiceException(String message, {required int statusCode, Status? status})
ServiceException.fromHttpResponse(BaseResponse response, String? responseBody)
Create a ServiceException (or appropriate subclass) from an HTTP response.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
A message describing the cause of the exception.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status → Status?
The status message returned by the server.
final
statusCode int
The HTTP status code that the server returned (e.g. 404).
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