Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Interface ApiError

    The JSON body of every error response.

    details is intentionally loose: for invalid_request it contains the validation issues (field paths + messages); for conflict codes it may carry the conflicting resource id (e.g. {asyncConsultId} on has_open_thread). Never required for handling — code alone is enough to branch on.

    interface ApiError {
        error: { code: ErrorCode; message: string; details?: unknown };
    }
    Index
    error: { code: ErrorCode; message: string; details?: unknown }

    Type Declaration

    • code: ErrorCode

      Stable machine-readable code — see ErrorCode for semantics.

    • message: string

      Human-readable explanation for logs/debugging. Wording is NOT stable.

    • Optionaldetails?: unknown

      Optional structured context (validation issues, conflicting ids, …).