Docs menu

Reference

Errors

The errors the server returns, and what to do about each.

CodeWhenWhat to do
-32700The body is not valid JSON.Send a single JSON object as the whole body of the request.
-32600The 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.
-32601The method is not one this server answers.Use initialize, ping, tools/list or tools/call.
-32602A 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.
-32001The 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.
-32002The 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.
-32003LexLint and its law library disagree about a record.Nothing on your side: report it with submit_feedback.
-32004The trial claim was refused, whether it came in as a claim token or through claim_trial_key. error.data.reason says why:
  • claim_invalid or claim_expired: the claim token does not verify, or is too old.
  • claim_redeemed: the claim token was already used.
  • address_mismatch: the claim token was issued to a different address.
  • already_keyed: the session already holds a key or a sign-in, so nothing was minted.
  • cap_reached: a trial-key limit was reached, and the message says which. Either this address has taken its trial keys for the day, or LexLint has issued all its trial keys for the hour across everyone, which clears within the hour.
  • unavailable: a trial key cannot be issued to this caller right now.
  • forwarding_rejected or upstream: the trial key service did not accept or answer the request, and no key was created.
  • key_propagating: the key was minted and has not reached every edge yet.
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.
-32029Too 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 401Sign-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 403On /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 404On /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 429The 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.