Errors
Handle LunnoaApiError status helpers in @lunnoa/client.
Failed HTTP calls throw LunnoaApiError with status helpers you can branch on.
Status helpers
| Property | Meaning |
|---|---|
status | HTTP status code |
body | Parsed error payload when available |
isUnauthorized | 401 (missing or revoked credential) |
isForbidden | 403 (role or licence edition does not cover the endpoint) |
isRateLimited | 429 (back off and retry) |
Example
errors.ts
Practical mapping:
- 401 → re-authenticate (refresh JWT or rotate the API key)
- 403 → hide the capability; the key's role or the deployment's licence edition does not cover the endpoint
- 429 → back off and retry
For minting keys and RBAC, see API authentication.
Next
- TypeScript client SDK: overview and auth patterns
- API reference: full public operation list