DioFailureMapper class final

Специализированный маппер ошибок HTTP-клиента Dio.

Преобразует DioException всех типов (timeout, badResponse, connectionError и т.д.) в соответствующие Failure: сетевые, HTTP, аутентификации, валидации или парсинга. Извлекает x-request-id из RequestOptions.extra для связи ошибок с логами сервера.

Используется в цепочке FailureSubMapper при работе с Dio-клиентом.

См. также: FailureSubMapper, CommonFailureMapper.

Implemented types

Constructors

DioFailureMapper()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
tryMap(Object error, [StackTrace? stackTrace]) → Failure?
Пытается преобразовать error в Failure, если это DioException.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited