await—your application decides how to log, retry, and present the failure.
What can go wrong
The table below describes typical upstream HTTP behavior you may encounter. Status codes and error bodies are not normalized by the SDK and can vary by microservice—do not treat this as a guaranteed taxonomy.
The SDK sets a 10 second timeout on the shared HTTP client. There is no built-in retry or circuit breaker—you implement resilience in your application layer if needed.
Basic handling pattern
Start with explicittry/catch around SDK calls. Log enough context for debugging (resource, method, correlation id) but never log headers or the authKey:
If you prefer Axios utilities such as
isAxiosError, import them from the axios package in your application. The SDK lists Axios as its own dependency; applications that import Axios directly should declare axios as a direct dependency to avoid relying on transitive installs.Map HTTP status to application behavior
Design handlers around intent, not around SDK internals:Retries and timeouts
Because the SDK does not retry automatically, you may add retries in application code. Apply these guardrails: Guidelines:- Reads (
list,get,latest): up to a small number of retries with exponential backoff when you see 502/503/504 or a timeout - Creates / updates / deletes: fail visibly on the first error unless your integration design explicitly supports safe replay (confirm with Lomadee before implementing)
- Auth errors (401/403): never retry—fix configuration
- Client errors (4xx): fix input; do not retry the same payload
Observability without leaking secrets
- Log HTTP status, the SDK method name (for example
terms.latest), and your own trace ids - Avoid logging full Axios
config.headers—they containx-auth-key - Return generic messages to end users; keep detailed upstream bodies in server-side logs only
When errors persist
- Verify
LOMADEE_AUTH_KEYandenvironmentmatch what Lomadee provisioned (Environments and secrets) - Re-run the Quickstart
sdk.terms.latest()check in the same environment - Contact Lomadee support with timestamps, environment, and the resource method—not your raw
authKey
Related documentation
- How the SDK works — timeout, shared client, no built-in retry
- Client reference — constructor and configuration types