HttpException class
A base class for specific HTTP exception classes. An optional Map named data can be provided to add additional information as the response body.
- Implemented types
- Implementers
- BadGatewayHttpException
- BadRequestHttpException
- ClientClosedRequestHttpException
- ConflictHttpException
- ConnectionClosedWithoutResponseHttpException
- ExpectationFailedHttpException
- FailedDependencyHttpException
- ForbiddenHttpException
- GatewayTimeoutHttpException
- GoneHttpException
- HttpVersionNotSupportedHttpException
- ImATeapotHttpException
- InsufficientSpaceOnResourceHttpException
- InsufficientStorageHttpException
- InternalServerErrorHttpException
- LengthRequiredHttpException
- LockedHttpException
- LoopDetectedHttpException
- MethodFailureHttpException
- MethodNotAllowedHttpException
- MisdirectedRequestHttpException
- NetworkAuthenticationRequiredHttpException
- NetworkConnectTimeoutErrorHttpException
- NotAcceptableHttpException
- NotExtendedHttpException
- NotFoundHttpException
- NotImplementedHttpException
- PaymentRequiredHttpException
- PreconditionFailedHttpException
- PreconditionRequiredHttpException
- ProxyAuthenticationRequiredHttpException
- RequestedRangeNotSatisfiableHttpException
- RequestEntityTooLargeHttpException
- RequestHeaderFieldsTooLargeHttpException
- RequestTimeoutHttpException
- RequestUriTooLongHttpException
- ServiceUnavailableHttpException
- TooManyRequestsHttpException
- UnauthorizedHttpException
- UnavailableForLegalReasonsHttpException
- UnprocessableEntityHttpException
- UnsupportedMediaTypeHttpException
- UpgradeRequiredHttpException
- VariantAlsoNegotiatesHttpException
- Annotations
-
- @immutable
Constructors
-
HttpException({required HttpStatus httpStatus, required String detail, Map<
String, dynamic> ? data, Uri? uri}) -
Constructs an HttpException with detailed information about the failure.
const
Properties
-
data
→ Map<
String, dynamic> ? -
Additional data about the exception as a map.
final
- detail → String
-
A human-readable message providing more details about the error.
final
- hashCode → int
-
Provides a hash code for this HttpException instance.
no setteroverride
- httpStatus → HttpStatus
-
The HTTP status code associated with the exception.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri?
-
The URI associated with the HTTP request that resulted in this error.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts the HttpException instance to a Map.
-
toString(
) → String -
Converts the HttpException to a String representation.
override
Operators
-
operator ==(
covariant HttpException other) → bool -
Compares this HttpException instance to another object.
override