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

Common ClearRun HTTP errors
HTTPMessage or codeWhat to do
400responseText is required or Message requiredSend the required field
400CONTENT_TOO_SHORTScore: responseText is too short to score. Evaluate: Content is too short to score. Chat: Message is too short to score
400CONTENT_TOO_LONGScore: responseText too long. Evaluate: Content too long. Chat: Message too long. Each includes maxLength and actualLength
400Request blockedThe request carried instructions aimed at ClearRun. The code is ACTION_NOT_ALLOWED
400Content blockedScore, evaluate and chat return error Content blocked and code CONTENT_BLOCKED
401Missing Authorization, or UnauthorizedAdd a valid key, or create a new one
402Insufficient creditsThe body can include credits needed and the current balance. Wait for your monthly reset, or move up a tier
403API_ACCESS_REQUIREDThat key is not a free developer key. A verified free account can create one
403WORKSPACE_FORBIDDENThat workspace is not on your account
403AUDIT_LEVELThat workspace’s audit level does not allow this export
404verdict not foundCheck the verdict id. Lookup does not score text
429Rate limit exceededWait for the Retry-After header, in seconds
500UNSIGNED_VERDICTClearRun could not sign the verdict, so it sent nothing back rather than an unsigned one. Retry. If it keeps happening, email contact@adepoco.com
503PERSIST_FAILEDClearRun 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.