Common ClearRun errors
Errors come back as JSON with an error message and an optional code. Fix the request, the key, or the credit balance, then retry. A 404 on verify means that verdict id was not found. It does not mean the text was scored.
Last updated
Shape
{ "error": "message", "code": "OPTIONAL_CODE" }
What to do
| HTTP | Message or code | What to do |
|---|---|---|
| 400 | responseText is required or Message required | Send the required field |
| 400 | CONTENT_TOO_SHORT | Score: responseText is too short to score. Evaluate: Content is too short to score. Chat: Message is too short to score |
| 400 | CONTENT_TOO_LONG | Score: responseText too long. Evaluate: Content too long. Chat: Message too long. Each includes maxLength and actualLength |
| 400 | Request blocked | The request carried instructions aimed at ClearRun. The code is ACTION_NOT_ALLOWED |
| 400 | Content blocked | Score, evaluate and chat return error Content blocked and code CONTENT_BLOCKED |
| 401 | Missing Authorization, or Unauthorized | Add a valid key, or create a new one |
| 402 | Insufficient credits | The body can include credits needed and the current balance. Wait for your monthly reset, or move up a tier |
| 403 | API_ACCESS_REQUIRED | That key is not a free developer key. A verified free account can create one |
| 403 | WORKSPACE_FORBIDDEN | That workspace is not on your account |
| 403 | AUDIT_LEVEL | That workspace’s audit level does not allow this export |
| 404 | verdict not found | Check the verdict id. Lookup does not score text |
| 429 | Rate limit exceeded | Wait for the Retry-After header, in seconds |
| 500 | UNSIGNED_VERDICT | ClearRun could not sign the verdict, so it sent nothing back rather than an unsigned one. Retry. If it keeps happening, email contact@adepoco.com |
| 503 | PERSIST_FAILED | ClearRun could not save the receipt or queue it for a retry, so the request was rejected. You were not charged. Retry |
Receipt shows queued? That is not an error. Saving was delayed. You are not charged unless and until the receipt is saved. Once it is saved, the call is charged, because the score was made. The public lookup returns 404 for that verdict id until the receipt is saved, usually within a few minutes.
SDK callers see these as HostedApiError. The CLI exits 1 and prints the message.