ForbiddenFailure class
Represents a forbidden access failure (e.g., 403).
- Inheritance
-
- Object
- Mirrorable
- Failure
- ForbiddenFailure
Constructors
- ForbiddenFailure.new({String message = 'Access is forbidden.', String? hint = 'You do not have permission.', int? code = 403, FailureLevel level = FailureLevel.warning, String? source = 'Auth', 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