BadRequestException class
When thrown in a Handler
, configured with badRequestMiddleware
or
similar, causes a response with statusCode to be returned.
statusCode must be >= 400
and <= 499
.
message is used as the body of the response send to the requester.
If provided, innerError and innerStack can be used to provide additional debugging information which is included in logs, but not sent to the requester.
- Implemented types
Constructors
- BadRequestException(int statusCode, String message, {Object? innerError, StackTrace? innerStack})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerError → Object?
-
final
- innerStack → StackTrace?
-
final
- message → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
final
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