errors/http_error library
Classes
-
HttpBadRequestError<
T> -
HttpNetworkError models http errors with
status 400
-
HttpError<
T> - Abstract class to model errors on the application. As a presset of foreseen specific errors there are some different implementations of this type. HttpError models errors related to http requests
-
HttpForbiddenError<
T> -
HttpForbiddenError models http errors with
status 403
-
HttpGoneError<
T> -
HttpGoneError models http errors with
status 410
-
HttpInternalServerError<
T> -
HttpInternalServerError models http errors with
status 500
-
HttpNetworkError<
T> - HttpNetworkError models errors related to network connection
-
HttpNotFoundError<
T> -
HttpNotFoundError models http errors with
status 404
-
HttpUnauthorizedError models http errors with
status 401
-
HttpUnknownError<
T> - HttpUnknownError models unknown http errors
-
NoInternetConnectionError<
T> - NoInternetConnectionError models errors related with failure in communication associated with failure of internet connection
-
UnprocessableEntityError<
T> -
UnprocessableEntityError models http errors with
status 422
Functions
-
parseHttpError<
T> ({required DioException error, StackTrace stackTrace = StackTrace.empty, String slug = '', String handleErrorMessage({required DioException error})?, T? errorResponseSerializer(dynamic)?, String defaultErrorMessage = "Algo inesperado aconteceu. Tente novamente mais tarde.", String defaultNoInternetConnectionMessage = ''}) → Future< HttpError< T> > -
parseSocketException<
T> ({required String msg, required DioException exception, String slug = '', Maybe< T> maybeErrorResponse = const Nothing()}) → Future<HttpError< T> >