@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Function adcpErrorToTypedError

    • Map a structured AdCP error (code + message) to a typed ADCPError subclass when the code has a dedicated class. Returns undefined for codes that don't have a typed mapping — callers should continue to use the untyped AdcpErrorInfo for those.

      Pass the idempotencyKey the SDK sent so the constructed error carries it for the caller's recovery logic. The server intentionally omits the key from error bodies (it's a read-oracle), so the transport-layer caller is the authoritative source.

      Parameters

      • adcpError: { code: string; message?: string; details?: unknown }
      • OptionalidempotencyKey: string

      Returns ADCPError | undefined