ApiException class
A base class for all API-related exceptions.
This class represents a general API error with an optional statusCode and message. It is the parent class of more specific API exceptions like BadRequestException, UnauthorizedException, etc.
- Implemented types
- Implementers
Constructors
- ApiException({int? statusCode, String? message})
-
Creates an ApiException with an optional
statusCodeandmessage.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
A human-readable message providing more details about the error.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
The HTTP status code associated with the error, if available.
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