Skip to main content

smart_api_errors_parser 1.0.0 copy "smart_api_errors_parser: ^1.0.0" to clipboard
smart_api_errors_parser: ^1.0.0 copied to clipboard

Maps inconsistent API error payloads into typed exceptions, form errors, and localized messages.

Changelog #

1.0.0 #

  • Added a rich ApiDecodedResponse model with separate HTTP/body statuses, Problem Details metadata, request/trace IDs, Retry-After data, selected decoder/schema, and parse warnings.
  • Replaced first-match automatic decoding with deterministic confidence scoring and ambiguity diagnostics.
  • Added GraphQL, OAuth 2.0, Spring Boot, Rails ActiveModel, and Firebase callable decoders.
  • Added composable field transforms for aliases, indexes, prefixes, case conversion, and JSON pointers.
  • Added sourced Laravel, Django REST Framework, ASP.NET, and JSON:API fixtures.
  • Added deterministic fuzz tests and bounded parsing for malformed and deeply nested payloads.
  • Preserved compatibility with existing custom ApiErrorDecoder implementations.

0.2.0 #

  • Added pluggable ApiErrorDecoder architecture.
  • Added automatic RFC 9457 Problem Details and ASP.NET validation decoding.
  • Added automatic JSON:API and Django REST Framework decoding.
  • Preserved Laravel nested maps and details-list compatibility.
  • Added configurable field-path normalization with JSON-pointer helpers.
  • Added configurable ApiExceptionClassifier and ApiExceptionFactory.
  • Made ApiException extensible for application-defined exception types.
  • Moved Dio APIs to dedicated smart_api_errors_parser_dio.dart entrypoint.
  • Expanded Flutter example to demonstrate all built-in response formats.

0.1.1 #

  • Fixed exception classification so authoritative HTTP statuses take priority over field-shaped payloads.
  • Preserved cancelled Dio requests as DioException values.
  • Added safe fallback when localization returns an empty message.
  • Improved malformed-payload handling and string normalization.
  • Enhanced ApiErrorMessage.copyWith with nullable-field clearing and argument replacement.
  • Added regression coverage for status classification, cancellation, timeout, coded nested messages, malformed payloads, and localization fallback.
  • Expanded public API documentation and added CI validation.

0.1.0 #

  • Added API error normalization with automatic schema detection.
  • Added field-level, global, and localized error messages.
  • Added typed API exceptions and Dio integration.
  • Added custom response parser support.
  • Added mapper and interceptor test coverage.
  • Added complete runnable Flutter example app.
  • Added Android, iOS, web, macOS, Windows, and Linux runners.
  • Demonstrated nested-map and details-list responses in interactive form.
  • Demonstrated Dio interception, typed exceptions, localization, and field errors.
  • Added widget tests for validation-error and successful-registration flows.
  • Expanded package and example documentation.
0
likes
160
points
48
downloads

Documentation

API reference

Publisher

verified publisherpinz.dev

Weekly Downloads

Maps inconsistent API error payloads into typed exceptions, form errors, and localized messages.

Repository (GitHub)
View/report issues

Topics

#api #dio #error-handling #localization #validation

License

MIT (license)

Dependencies

dio

More

Packages that depend on smart_api_errors_parser