Stone.js API
    Preparing search index...

    Thrown when an authenticated principal lacks a required scope. Carries statusCode = 403.

    Named for what happened rather than for the category it belongs to. It used to be AuthorizationError, which @stone-js/authz also exports for a policy denial — two packages, one name, and an application mapping errors had to map both and hope it had guessed which was which. Both throw sites here say "missing required scope", so this says it too.

    Hierarchy

    • IntegrationError
      • InsufficientScopeError
    Index
    • Parameters

      • message: string
      • options: ErrorOptions = {}

      Returns InsufficientScopeError

    cause?: Error
    code?: string
    metadata?: unknown
    statusCode: 403
    • Converts the error to a formatted string representation.

      Parameters

      • Optionalmultiline: boolean

        Determine if output value must be multiline or not.

      Returns string

      A formatted error string.

    • Create a RuntimeError.

      Type Parameters

      • T extends RuntimeError = RuntimeError

      Parameters

      • message: string
      • Optionaloptions: ErrorOptions

        The options to create a RuntimeError.

      Returns T

      A new RuntimeError instance.