BadRequestFailure class
Represents a failure due to bad request (e.g., 400).
- Inheritance
-
- Object
- Mirrorable
- Failure
- BadRequestFailure
Constructors
- BadRequestFailure.new({String message = 'Invalid request.', String? hint = 'Please check your data and try again.', int? code = 400, FailureLevel level = FailureLevel.warning, String? source = 'Client', StackTrace? stackTrace})
-
const
Properties
- code → int?
-
Optional error code (HTTP status code, DB error code, etc.).
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hint → String?
-
A short hint to be shown to users, like actionable advice.
finalinherited
- level → FailureLevel
-
The severity level of the failure.
finalinherited
- message → String
-
Human-readable error message for logs or UI.
finalinherited
-
props
→ List<
Object?> -
Override this getter to list all fields that should be
considered for equality and hashCode.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String?
-
Where the error originated (e.g., "Server", "Cache", "Validation").
finalinherited
- stackTrace → StackTrace?
-
Optional stack trace for debugging.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited