@kagamidigital/salt-sdk-mirror
    Preparing search index...

    Class DuplicatePolicyError

    Thrown when creating a Policy that clashes with one already on the account. The backend permits only one policy per type + chain, and returns a 400 with a "Duplicate policy type" message when that constraint is violated; the SDK surfaces that as this typed error.

    This is a subclass of ApiError (with status === 400), so existing catch (e) { if (e instanceof ApiError) ... } handlers continue to work; callers wanting to special-case the duplicate can check for DuplicatePolicyError specifically.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    body?: unknown

    The full parsed JSON response body, when available.

    code?: string

    Application error code from the response body, if present. E.g. "INSUFFICIENT_FUNDS", "CALL_EXCEPTION".

    message: string
    method?: string

    The HTTP method (e.g. GET, POST), when available.

    name: string
    stack?: string
    status: number

    HTTP status code (e.g. 500, 404).

    url?: string

    The request URL, when available.