FlatMapApiErrorDecoder class final

Decodes top-level field maps used by Django REST Framework.

Inheritance

Constructors

FlatMapApiErrorDecoder({List<String> globalKeys = const ['non_field_errors', 'nonFieldErrors', 'message', 'error', 'errors', 'detail']})
Creates a flat-map decoder.
const

Properties

globalKeys → List<String>
Keys treated as global errors.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable decoder identifier.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schema → ApiErrorSchema
Built-in schema represented by this decoder.
no setteroverride

Methods

canDecode(Object? data) → bool
Whether this decoder recognizes data.
inherited
confidence(Object? data) → double
Recognition confidence from 0 (no match) to 1 (certain match).
override
decode(Object? data) → Iterable<ApiErrorMessage>
Decodes data into normalized messages.
inherited
decodeResponse(Object? data) → ApiDecodedResponse
Decodes messages and response metadata.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
response(Object? data, Iterable<ApiErrorMessage> errors, {Iterable<ApiParseWarning> warnings = const [], String? problemType}) → ApiDecodedResponse
Creates a decoded response and extracts common body metadata.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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