smart_api_errors_parser_dio library
Dio integration for smart_api_errors_parser.
Classes
- ApiDecodedResponse
- Rich, decoder-level representation of an API error body.
- ApiErrorDecoder
- Converts one backend response shape into normalized error messages.
- ApiErrorDecoders
- Provides built-in decoder instances for schemas.
- ApiErrorInterceptor
- Maps Dio failures into package exceptions.
- ApiErrorMapper
- Converts API response bodies into one stable error model.
- ApiErrorMessage
- One normalized error produced from an API response.
- ApiErrorResult
- Normalized, UI-ready representation of an API error response.
- ApiExceptionClassifier
- Configurable policy for mapping statuses and payloads to exception types.
- ApiFieldPathNormalizers
- Common field-path normalization strategies.
- ApiParseWarning
- A non-fatal issue found while decoding an error response.
- AutoApiErrorDecoder
- Selects the highest-confidence built-in decoder.
- BuiltInApiErrorDecoder
- Shared implementation for rich built-in decoders.
- DetailsListApiErrorDecoder
-
Decodes
{ "details": [{ "field": ..., "message": ... }] }. - FirebaseCallableApiErrorDecoder
- Decodes Firebase callable-function error envelopes.
- FlatMapApiErrorDecoder
- Decodes top-level field maps used by Django REST Framework.
- GraphqlApiErrorDecoder
- Decodes GraphQL response errors.
- JsonApiErrorDecoder
- Decodes JSON:API error objects.
- NestedMapApiErrorDecoder
-
Decodes Laravel-style
{ "errors": { "field": [...] } }responses. - OAuth2ApiErrorDecoder
- Decodes OAuth 2.0 error responses.
- ProblemDetailsApiErrorDecoder
- Decodes RFC 9457 Problem Details and ASP.NET validation extensions.
- RailsActiveModelApiErrorDecoder
- Decodes Rails ActiveModel attribute error maps.
- RichApiErrorDecoder
- Optional rich contract implemented by built-in decoders.
- SpringBootApiErrorDecoder
- Decodes Spring Boot legacy validation error responses.
Enums
- ApiErrorSchema
- Common shapes used by validation error responses.
- ApiParseWarningCode
- Machine-readable warning produced while selecting or parsing a decoder.
Extensions
-
DioApiErrorFuture
on Future<
T> - Lets repository methods expose typed API exceptions instead of Dio errors.
Typedefs
- ApiErrorLocalizer = String Function(ApiErrorMessage error)
- Converts a normalized API error into text for current locale.
-
ApiErrorParser
= Iterable<
ApiErrorMessage> Function(Object? data) - Function for backends whose response shape is not built in.
- ApiExceptionFactory = ApiException Function(ApiErrorResult result, {Object? cause, StackTrace? stackTrace})
- Creates an application-specific exception from a normalized result.
- ApiFieldPathNormalizer = String? Function(String? field)
- Normalizes a backend field path for a form or state model.
Exceptions / Errors
- ApiAuthenticationException
- Authentication failure, normally HTTP 401.
- ApiAuthorizationException
- Authorization failure, normally HTTP 403.
- ApiConflictException
- Resource conflict, normally HTTP 409.
- ApiException
- Base type for normalized API failures.
- ApiNetworkException
- Transport failure where no HTTP response was received.
- ApiNotFoundException
- Missing-resource failure, normally HTTP 404.
- ApiRateLimitException
- Rate-limit failure, normally HTTP 429.
- ApiServerException
- Server failure, normally HTTP 5xx.
- ApiUnknownException
- Failure that does not match another exception category.
- ApiValidationException
- Validation failure containing field-level and optional global errors.