Errors & limits
Every error is an HTTP status and { "error": { "code": "…", "message": "…" } }; the SDKs turn it into an exception.
import { HaltoUnavailableError } from "@halto/sdk";
try {
const r = await halto.check(input);
} catch (err) {
if (err instanceof HaltoUnavailableError) {
console.error("Halto can't be reached: not running the action");
}
throw err;
}If Halto can't be reached, the action doesn't run
The SDKs throw, and there is no setting that lets it through instead. An error inside Halto blocks the action too. More.
Error codes
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_request · invalid_json | A request Halto can't read. | Fix it: message says what is wrong. |
| 400 | invalid_target_url | A webhook address Halto won't call. | Use a public https:// address. |
| 401 | missing_api_key · invalid_api_key | No key, or a wrong or revoked one. | Send Authorization: Bearer hk_…. |
| 402 | data_guard_limit | /v1/clean: the plan's hidden values for this month are used up, so the text is held back. | message says how to go on. |
| 403 | demo_workspace | The key is from a demo workspace with sample data. | Create your own workspace for real agents. |
| 404 | not_found | An unknown id. | Check the id, and that it belongs to this agent. |
| 409 | too_many_hooks | An agent can have at most 20 webhooks. | Delete unused ones first. |
| 413 | payload_too_large | The body is too large. | Send less at once. |
| 429 | rate_limited | Too many requests from this agent. | Wait retry_after seconds. The SDKs wait and retry. |
| 429 | too_busy | One workspace sends more at once than its share. | Wait retry_after seconds. The SDKs wait and retry. |
| 500 | internal_error | Something went wrong inside Halto: the action is blocked. | Try again later. |
| 503 | database_busy | Halto under a burst. | Wait retry_after seconds. The SDKs wait and retry. |
| 503 | data_guard_busy | /v1/clean: Halto's model couldn't check the text for names and addresses just now, so it is held back. | Try again in a minute. |