ResponseError class
Error details for a failed response.
- Annotations
-
- @immutable
Constructors
- ResponseError({required String type, String? code, required String message, String? param})
-
Creates a ResponseError.
const
-
ResponseError.fromJson(Map<
String, dynamic> json) -
Creates a ResponseError from JSON.
factory
Properties
- code → String?
-
The error code, if any.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- message → String
-
The error message.
final
- param → String?
-
The parameter associated with the error, if any.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The error type (e.g.,
'server_error','invalid_request_error').final
Methods
-
copyWith(
{String? type, Object? code = unsetCopyWithValue, String? message, Object? param = unsetCopyWithValue}) → ResponseError - Creates a copy with replaced values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override