Errors
OwlViz API errors use a consistent JSON envelope:
json
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message."
}
}The TypeScript SDK throws OwlVizApiError with status, code, and message parsed from this shape.
ts
import { OwlViz, OwlVizApiError } from '@owlviz/sdk';
try {
await client.assets.get('not-a-valid-mint');
} catch (err) {
if (err instanceof OwlVizApiError) {
console.error(err.code, err.status, err.message);
}
}Client guidance
- Treat any non-2xx as failure; read
error.codewhen present. - Legacy Fastify validation responses may omit
error.code— fall back tomessageor HTTP status. - Stack traces are never returned to clients.
Common codes (sample)
| Code | Typical HTTP | Meaning |
|---|---|---|
ASSET_NOT_FOUND | 404 | Mint could not be resolved |
COLLECTION_NOT_FOUND | 404 | Collection not indexed |
RATE_LIMITED | 429 | RPM exceeded — honor Retry-After |
AUTOMATION_AUTH_REQUIRED | 401 | Keyed auth required (monitors, webhooks list) |
INVALID_API_KEY | 401 | Missing or invalid ov_live_… key |
Full matrix and retry behavior: [errors-and-rate-limits.md](./errors-and-rate-limits.md).