ApiError<U> class

Represents an error response from an API.

This class is used for handling errors returned by the API, typically with an error object and an associated HTTP status code.

  • U: The type of the error response body.
Inheritance

Constructors

ApiError({required U error, required int code})
Constructs an ApiError response with the given error object and status code.
const

Properties

code int
The HTTP status code associated with the error.
final
error → U
The error object returned by the API.
final
hashCode int
The hash code for this object.
no setterinherited
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.
inherited

Operators

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