Creates a new ForbiddenError instance with optional details.
Optional
details: Record<string, unknown>Additional error details.
Creates a new ForbiddenError instance with a message, type, and optional details.
Optional
message: stringCustom error message.
Optional
type: ForbiddenErrorTypeSpecific error type identifier.
Optional
details: Record<string, unknown>Additional error details.
Optional
detailsAdditional error details (optional).
Descriptive error message.
HTTP status code associated with the error.
Indicates if the response was successful (always false
for errors).
Error type.
Converts the error instance to a JSON object compatible with the ErrorResponse interface.
Serializable error object.
Represents a generic forbidden error (HTTP 403).
Thrown when a user tries to access a resource they do not have permission for. Can be instantiated with a custom message and type, or just with a
details
object.