ForbiddenException class
The caller is authenticated, and is not allowed to do this.
Raised by the database when a collection's policy denies the operation, or denies a field the request body carried. Policies are authored by an administrator in the Appstrax admin panel; this SDK cannot read or change them, so there is nothing an application can do but respect the answer.
Its own type, rather than an UnauthorizedException, because the two call for opposite responses. A 401 means the session is over and the user should sign in; a 403 means the session is perfectly good and signing in again would accomplish nothing. Sharing a type made a permissions error look like an expired one, which is how a user gets bounced to a login screen for a button they were never allowed to press.
- Inheritance
-
- Object
- HttpException
- ForbiddenException
Constructors
- ForbiddenException(String message, {int? status})
Properties
- body → String?
-
The response body exactly as it arrived, when there was one.
finalinherited
- code → String?
-
The API's machine-readable reason, when it sent one.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The response body, or a description of the failure when there was no body.
finalinherited
- prefix → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int?
-
The HTTP status the API answered with, when the failure came from a
response at all.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
The failure, without the response body.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited