@schibsted/account-sdk-browser
    Preparing search index...

    Class SDKError

    Custom error class thrown by all SDK methods on failure.

    All rejected promises from API calls reject with an instance of this class.

    Hierarchy

    Index

    Constructors

    Methods

    Properties

    Constructors

    • Parameters

      • message: string

        Human-readable error message

      • OptionalerrorObject: Record<string, unknown>

        Optional server error payload. All enumerable properties are shallow-copied onto this instance.

      Returns SDKError

    Methods

    • Returns a multi-line string with the error name, message, and any other properties copied from the server error payload.

      Returns string

    Properties

    code?: number

    HTTP status code from the server error payload; declared explicitly to allow numeric comparisons without type-casting.