FlatMapApiErrorDecoder class final
Decodes top-level field maps used by Django REST Framework.
- Inheritance
-
- Object
- BuiltInApiErrorDecoder
- FlatMapApiErrorDecoder
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) to1(certain match).override -
decode(
Object? data) → Iterable< ApiErrorMessage> -
Decodes
datainto 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