HttpException class

Base class for all HTTP exceptions that can be rendered as JSON responses.

Implemented types
Implementers

Constructors

HttpException(int statusCode, String message, [Map<String, dynamic>? details])
Creates a new HttpException with the given statusCode and message.

Properties

details Map<String, dynamic>?
Optional structured error details (e.g., validation errors).
final
hashCode int
The hash code for this object.
no setterinherited
message String
A human-readable error message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The HTTP status code (e.g., 404, 500).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the exception to a JSON-compatible map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited