SDK errors
Published release: SDK 0.1.3 is publicly available on npm. Package installation does not activate new backend features.
KordivaError exposes code, HTTP status, optional requestId and optional retryAfterMs. Network/timeout errors have status 0. Raw response bodies and provider/customer data are omitted.
| Code / status | Action |
|---|---|
SDK_SERVER_ONLY | Move credential-bearing code to your backend |
SDK_KEY_ENVIRONMENT_MISMATCH | Check TEST/LIVE key and environment together |
SDK_INVALID_ARGUMENT | Check UUIDs, quantities, exact API origin and input bounds |
SDK_ABORTED / SDK_TIMEOUT / SDK_NETWORK_ERROR | Reconcile uncertain checkout first; do not blindly create another session |
SDK_INVALID_RESPONSE | Confirm API origin/version and investigate the request ID |
| 401 / 403 | Review store, revocation, plan, seller approval and environment |
TEST_API_ENDPOINT_UNSUPPORTED | Use supported TEST catalog reads or createTest |
TEST_SALE_MARKET_REQUIRED | Provide the Individual TEST market |
| 429 | Respect Retry-After and reduce request volume |
GET defaults to two retries for network failures or HTTP 429/502/503/504. Configure maxReadRetries from 0–3. Backoff is bounded; if Retry-After exceeds five seconds the SDK returns the error instead of retrying early. POST never retries automatically. There is no infinite confirmation polling helper.
timeoutMs defaults to 10,000 per attempt (1–120,000 allowed). An optional AbortSignal cancels reads/retry waits and requests. An abort or timeout does not cancel a session the server may already have created.