DioException class
DioException describes the exception info when a request failed.
- Implemented types
- Available extensions
Constructors
- DioException({required RequestOptions requestOptions, Response? response, DioExceptionType type = DioExceptionType.unknown, Object? error, StackTrace? stackTrace, String? message})
- Prefer using one of the other constructors. They're most likely better fitting.
- DioException.badCertificate({required RequestOptions requestOptions, Object? error})
-
factory
- DioException.badResponse({required int statusCode, required RequestOptions requestOptions, required Response response})
-
factory
- DioException.connectionError({required RequestOptions requestOptions, required String reason, Object? error})
-
factory
- DioException.connectionTimeout({required Duration timeout, required RequestOptions requestOptions, Object? error})
-
factory
- DioException.receiveTimeout({required Duration timeout, required RequestOptions requestOptions, Object? error})
-
factory
- DioException.requestCancelled({required RequestOptions requestOptions, required Object? reason, StackTrace? stackTrace})
-
factory
- DioException.sendTimeout({required Duration timeout, required RequestOptions requestOptions})
-
factory
Properties
- error → Object?
-
The original error/exception object;
It's usually not null when
type
is DioExceptionType.unknown.final - falconMessage → String?
-
Available on DioException, provided by the DioExceptionI18nExtension extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- i18nMessage → String?
-
Available on DioException, provided by the DioExceptionI18nExtension extension
no setter - isJsonResponse → bool
-
Available on DioException, provided by the DioExceptionI18nExtension extension
no setter - isNotFoundAnnouncement → bool
-
Available on DioException, provided by the DioExceptionExtension extension
no setter - isNotPermission → bool
-
Available on DioException, provided by the DioExceptionExtension extension
no setter -
Available on DioException, provided by the DioExceptionExtension extension
no setter - message → String?
-
The error message that throws a DioException.
final
- requestOptions → RequestOptions
-
The request info for the request that throws exception.
final
- response → Response?
-
Response info, it may be
null
if the request can't reach to the HTTP server, for example, occurring a DNS error, network is not available.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The stacktrace of the original error/exception object;
It's usually not null when
type
is DioExceptionType.unknown.final - type → DioExceptionType
-
final
Methods
-
copyWith(
{RequestOptions? requestOptions, Response? response, DioExceptionType? type, Object? error, StackTrace? stackTrace, String? message}) → DioException - Generate a new DioException by combining given values and original values.
-
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