@ingeze/api-error - v1.0.8
    Preparing search index...

    Class ForbiddenError

    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.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new ForbiddenError instance with optional details.

      Parameters

      • Optionaldetails: Record<string, unknown>

        Additional error details.

      Returns ForbiddenError

    • Creates a new ForbiddenError instance with a message, type, and optional details.

      Parameters

      • Optionalmessage: string

        Custom error message.

      • Optionaltype: ForbiddenErrorType

        Specific error type identifier.

      • Optionaldetails: Record<string, unknown>

        Additional error details.

      Returns ForbiddenError

    Properties

    details?: Record<string, unknown>

    Additional error details (optional).

    message: string

    Descriptive error message.

    statusCode: number

    HTTP status code associated with the error.

    success: boolean

    Indicates if the response was successful (always false for errors).

    type: string

    Error type.

    Methods