UnauthorizedException class

Thrown when authentication is required but missing or invalid (401).

Inheritance

Constructors

UnauthorizedException([String message = 'Unauthorized'])
Creates a new UnauthorizedException.

Properties

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

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.
inherited
toString() String
A string representation of this object.
inherited

Operators

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