ClientException class
A unified exception class that works with both http and dio backends.
- Implemented types
Constructors
- ClientException({required String message, String? url, int? statusCode, ClientErrorType type = ClientErrorType.unknown, Object? originalError, String? responseBody})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCancelled → bool
-
Returns true if the request was cancelled.
no setter
- isConnectionError → bool
-
Returns true if this is a connection error.
no setter
- isTimeout → bool
-
Returns true if this is a timeout error.
no setter
- message → String
-
The error message.
final
- originalError → Object?
-
The original error object from the underlying client.
final
- responseBody → String?
-
The response body if available (for error responses).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
The HTTP status code if available.
final
- type → ClientErrorType
-
The error type.
final
- url → String?
-
The request URL 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