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

    Interface AdcpErrorOptions

    interface AdcpErrorOptions {
        message: string;
        recovery?: ErrorRecovery;
        field?: string;
        suggestion?: string;
        retry_after?: number;
        details?: Record<string, unknown>;
        issues?: (Omit<ValidationIssue, "schemaPath"> & { schemaPath?: string })[];
    }
    Index

    Properties

    message: string
    recovery?: ErrorRecovery

    Override the recovery classification. Defaults to STANDARD_ERROR_CODES[code].recovery for known codes, 'terminal' otherwise. Dropped from the wire shape for codes whose entry in ADCP_ERROR_FIELD_ALLOWLIST excludes it (IDEMPOTENCY_CONFLICT excludes recovery — the classifier is derivable from the code).

    field?: string

    Name of the request field the error applies to (validation / constraint errors). Dropped from the wire shape for codes whose ADCP_ERROR_FIELD_ALLOWLIST entry excludes it (e.g. IDEMPOTENCY_CONFLICT — a conflict response MUST NOT echo prior payload state).

    suggestion?: string

    Human-readable remediation hint. Dropped from the wire shape for codes whose ADCP_ERROR_FIELD_ALLOWLIST entry excludes it (e.g. IDEMPOTENCY_CONFLICT).

    retry_after?: number

    Seconds to wait before retrying a transient error. Only meaningful on retryable codes (RATE_LIMITED, SERVICE_UNAVAILABLE); dropped on terminal codes whose allowlist excludes it (IDEMPOTENCY_CONFLICT — a computed retry_after on conflict would leak cached-entry age).

    details?: Record<string, unknown>

    Code-specific diagnostic payload. Dropped from the wire shape for codes whose ADCP_ERROR_FIELD_ALLOWLIST entry excludes it (IDEMPOTENCY_CONFLICT — a conflict response MUST NOT echo the prior request payload or cached response body).

    issues?: (Omit<ValidationIssue, "schemaPath"> & { schemaPath?: string })[]

    Schema validation issues surfaced at the top level of adcp_error so operators see JSON Pointers on the first render. Primary use is VALIDATION_ERROR; framework validation hooks populate this automatically and also mirror the same array to details.issues for buyers that already index into details per AdCP spec convention.