code is a machine-readable string you can match against in code. message is a human-readable description of the problem.
Error codes
| HTTP status | Code | Meaning |
|---|---|---|
400 | VALIDATION_ERROR | Request body or query parameters failed validation |
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | Valid key but insufficient scope for this operation |
404 | AGENT_NOT_FOUND | Agent does not exist in this workspace |
404 | POLICY_NOT_FOUND | Policy does not exist |
404 | API_KEY_NOT_FOUND | API key does not exist |
429 | RATE_LIMITED | Rate limit exceeded |
500 | INTERNAL_ERROR | Internal server error |
Rate limit errors
When you receive a429, the response includes a Retry-After header with the number of seconds until the rate limit window resets:
SDK error handling
Node.js
The Veto Node.js SDK exposes three error classes:VetoError— base class for all Veto errors. Has.code(string) and.statusCode(number).UnauthorizedError— thrown on401responses. ExtendsVetoError.RateLimitError— thrown on429responses. ExtendsVetoError. Has.retryAfterMs(milliseconds until reset).