http_exception library

A comprehensive and customizable system for handling HTTP exception in Dart applications.

Extensions

HttpStatusExtension on HttpStatus
Extension on HttpStatus to easily convert HTTP status codes into corresponding HttpException instances, allowing for more descriptive and granular error handling.
IntHttpStatusExtension on int
An extension on the int type to facilitate the creation of HttpException instances based on HTTP status codes.

Exceptions / Errors

BadGatewayHttpException
502 Bad Gateway (Http Exception).
BadRequestHttpException
400 Bad Request (Http Exception).
ClientClosedRequestHttpException
499 Client Closed Request (Http Exception).
ConflictHttpException
409 Conflict (Http Exception).
ConnectionClosedWithoutResponseHttpException
444 Connection Closed Without Response (Http Exception).
ExpectationFailedHttpException
417 Expectation Failed (Http Exception).
FailedDependencyHttpException
424 Failed Dependency (Http Exception).
ForbiddenHttpException
403 Forbidden (Http Exception).
GatewayTimeoutHttpException
504 Gateway Timeout (Http Exception).
GoneHttpException
410 Gone (Http Exception).
HttpException
A base class for specific HTTP exception classes. An optional Map named data can be provided to add additional information as the response body.
HttpVersionNotSupportedHttpException
505 Http Version Not Supported (Http Exception).
ImATeapotHttpException
418 I'm A Teapot (Http Exception).
InsufficientSpaceOnResourceHttpException
419 Insufficient Space On Resource (Http Exception).
InsufficientStorageHttpException
507 Insufficient Storage (Http Exception).
InternalServerErrorHttpException
500 Internal Server Error (Http Exception).
LengthRequiredHttpException
411 Length Required (Http Exception).
LockedHttpException
423 Locked (Http Exception).
LoopDetectedHttpException
508 Loop Detected (Http Exception).
MethodFailureHttpException
420 Method Failure (Http Exception).
MethodNotAllowedHttpException
405 Method Not Allowed (Http Exception).
MisdirectedRequestHttpException
421 Misdirected Request (Http Exception).
NetworkAuthenticationRequiredHttpException
511 Network Authentication Required (Http Exception).
NetworkConnectTimeoutErrorHttpException
59 Network Authentication Required (Http Exception).
NotAcceptableHttpException
406 Not Acceptable (Http Exception).
NotExtendedHttpException
511 Not Extended (Http Exception).
NotFoundHttpException
404 Not Found (Http Exception).
NotImplementedHttpException
501 Not Implemented (Http Exception).
PaymentRequiredHttpException
402 Payment Required (Http Exception).
PreconditionFailedHttpException
412 Precondition Failed (Http Exception).
PreconditionRequiredHttpException
428 Precondition Required (Http Exception).
ProxyAuthenticationRequiredHttpException
407 Proxy Authentication Required (Http Exception).
RequestedRangeNotSatisfiableHttpException
416 Requested Range Not Satisfiable (Http Exception).
RequestEntityTooLargeHttpException
413 Request Entity Too Large (Http Exception).
RequestHeaderFieldsTooLargeHttpException
431 Request Header Fields Too Large (Http Exception).
RequestTimeoutHttpException
408 Request Timeout (Http Exception).
RequestUriTooLongHttpException
414 Request Uri Too Long (Http Exception).
ServiceUnavailableHttpException
503 Service Unavailable (Http Exception).
TooManyRequestsHttpException
429 Too Many Requests (Http Exception).
UnauthorizedHttpException
401 Unauthorized (Http Exception).
UnavailableForLegalReasonsHttpException
451 Unavailable For Legal Reasons (Http Exception).
UnprocessableEntityHttpException
422 Unprocessable Entity (Http Exception).
UnsupportedMediaTypeHttpException
415 Unsupported Media Type (Http Exception).
UpgradeRequiredHttpException
426 Upgrade Required (Http Exception).
VariantAlsoNegotiatesHttpException
506 Variant Also Negotiates (Http Exception).