Docs menu
Get started
Quickstart Install: Claude Code Install: Codex Install: Kiro Install: other clients API keysConcepts
How a run works The app profile The severity model What a run does not sayTools
check_access claim_trial_key set_profile run_lint get_law resolve_domain_jurisdiction submit_feedback upload_lint_runGuides
A whole run, end to end Console TestPack in CIReference
Endpoint and transport lexlint.yml schema Errors ChangelogHelp
Support and feedbackReference
Errors
The errors the server returns, and what to do about each.
| Code | When | What to do |
|---|---|---|
-32700 | The body is not valid JSON. | Send a single JSON object as the whole body of the request. |
-32600 | The body is JSON, but its jsonrpc member is not "2.0". | Send "jsonrpc": "2.0", a method and an id. A request with no id is a notification, and gets no answer. |
-32601 | The method is not one this server answers. | Use initialize, ping, tools/list or tools/call. |
-32602 | A tools/call names an unknown tool, names no tool at all, or carries arguments that do not match the tool's parameters. | Take tool names from tools/list and read the tool's page. error.message names the tool or the argument at fault. |
-32001 | The call needs a key or a sign-in it does not carry: a tool that needs a key called with an empty X-API-Key, the day's free law lookups used up, a token that does not validate, or a token without the permission the tool needs. Some arrive inside an HTTP 401 or 403 instead (the rows below): a token that does not validate, and on /mcp a token without the permission or a client that sends no credential at all. With an empty X-API-Key it is always an HTTP 200. | Send your key in X-API-Key, or sign in. error.data.setup carries the steps. |
-32002 | The UnGovr Open Data API, which LexLint reads from, refused the call. error.data.reason says which kind: daily_free_tier_exhausted (the free allowance is spent), payment_required (the allowance is spent and no reset is coming) or upstream_error (any other refusal, with its HTTP status in error.data.upstream_status). | A spent allowance: wait error.data.retry_after_seconds for the reset, or use another key. A rejected key (upstream_status is 401): follow error.data.setup. |
-32003 | LexLint and its law library disagree about a record. | Nothing on your side: report it with submit_feedback. |
-32004 | The trial claim was refused, whether it came in as a claim token or through claim_trial_key. error.data.reason says why:
| Read error.data.reason. When the reply carries error.data.trial_page, open that page in a browser and paste the key it gives you. error.data.setup carries the steps either way. When error.data.retry_after_seconds is present, wait that long. On key_propagating, retry in ten seconds with the key in error.data.lexlint_trial.api_key. |
-32029 | Too many calls from one address that never reached your key's own allowance. Counted: connection-setup calls, pings, claim token redemptions, and tool calls that carry no key, no tool name, an unknown tool, or arguments that do not validate. | Wait error.data.retryAfter seconds, and connect once rather than in a loop. Send a key, and check a call's tool name and arguments against its tool's page before sending it. |
| HTTP 401 | Sign-in is needed. On /mcp, from a client that sends no credential: a call to run_lint, set_profile, upload_lint_run, submit_feedback or claim_trial_key, or a law lookup after the day's free lookups are used up. On either lane, a token that does not validate. The authentication challenge in the response headers carries error="invalid_token", resource_metadata and scope="opendata:read account:write", plus a one-sentence error_description on the first two; the body is a -32001 error. | A client that signs in through ungovr.org shows its own sign-in step, and the call runs once you are signed in; in Claude Code, run /mcp, choose lexlint and sign in. A client that cannot sign in sends a key in X-API-Key instead. |
| HTTP 403 | On /mcp, a token without the permission the tool needs. The authentication challenge in the response headers carries error="insufficient_scope" and scope="opendata:read account:write", naming both permissions; the body is a -32001 error. | Sign in again and approve both permissions. |
| HTTP 404 | On /mcp, from a client that sends no key or an empty one: an Mcp-Session-Id this server did not issue, or one dated more than 30 days ago or in the future. The body is empty. | Send initialize again, and use the Mcp-Session-Id its answer carries. |
| HTTP 429 | The edge rate limit on the browser lane. | One call every two seconds. |
A tool that refuses an argument can also answer with a result whose isError is true. Its text says which argument and why.