Skip to main content
Nikiwa signals outcomes at two levels: standard HTTP status codes for transport and auth, and in-body status markers for tool-level results.

HTTP status codes

StatusMeaningWhat to do
200 OKRequest handled. Check the body for a tool-level status marker.Read the body.
401 UnauthorizedMissing, malformed, or revoked key.Check the Authorization header; rotate the key if revoked.
404 Not FoundThe tool name is unknown or not public.Verify the name against discovery.
422 Unprocessable EntityInvalid arguments for the tool.Check the tool’s input schema from discovery.
429 Too Many RequestsPer-key rate limit exceeded.Back off and retry.
5xxServer-side error.Retry with backoff.

Tool-level status markers

A tool call can return 200 OK and still contain no data. Nikiwa tools return their data object on success, or one of these markers:
{
  "...": "the tool's structured data"
}
Always branch on the body, not just the HTTP code. A 200 with {"status": "no_data"} means the query was valid but nothing matched, for example a wallet with no activity on the requested network.
1

Check the HTTP status

Handle 401, 404, and 429 before parsing the body.
2

Check for a status marker

If the body has status: "error" or status: "no_data", handle it explicitly.
3

Otherwise, use the data

A body with no error or no-data marker is a successful data result.