ValidationException class
Exception thrown when the server returns a 422 Unprocessable Entity response.
Thrown by Connector.send when the server rejects the request due to
validation errors. The statusCode is always 422. Field-level error
details are available via errors.
- Inheritance
-
- Object
- LuckyException
- ValidationException
Constructors
-
ValidationException(String message, {Map<
String, dynamic> ? errors, LuckyResponse? response}) -
Creates a ValidationException with the given error
message.
Properties
-
errors
→ Map<
String, dynamic> ? -
A map of field names to their associated validation error messages.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The human-readable error message.
finalinherited
- response → LuckyResponse?
-
The LuckyResponse that triggered this exception, if available.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int?
-
The HTTP status code associated with this error, if available.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited