Docs · Errors

Errors

On this page

A refusal is the normal envelope with "ok": false and one or more problems. Nothing is applied when a write is refused.

{"ok": false,
 "text": "Not applied w-8b1d07e2c4 · basis_changed: 5c1e7a90 is at r5; you read r3\n  Re-read it (query 5c1e7a90), then retry under a new request_id with the revision you read.",
 "errors": [{"code": "basis_changed", "message": "5c1e7a90 is at r5; you read r3",
             "field": "expect.5c1e7a90", "requested_id": "item_5c1e7a90…",
             "hint": "Re-read it (query 5c1e7a90), then retry under a new request_id with the revision you read."}],
 "notices": [], "page": {"complete": true, "next_cursor": null}, "timing_ms": {"total": 1.1}}
FieldMeaning
codeStable, for programs
messageWhat happened
hintWhen present, the next step, often a runnable command
choicesAllowed values, or the records an ambiguous reference could mean
fieldWhen supplied, where in the request, for example operations[1].data.to or fields.priority
input_indexWhich operation of a write
requested_idThe record the problem is about

Codes

Notices

Notices accompany a successful answer:

Errors from the clients

The CLI and MCP server print the service's refusals exactly as worded. They also report these client errors:

CodeMeaning
invalid_inputCLI usage error caught before sending, such as a missing @N; exit 2, with no field or attempted address. A hint, when present, gives the next step
not_configuredWIRK is not set up on this machine. Run wirk login
service_unavailableThe service could not be reached (DNS, refused, TLS, timeout). Check the network, then open the health endpoint without a token
login_pendingwirk login is still waiting for the person to approve its code. After approving, run wirk login again; it resumes the same code
outcome_unknownA write or review got no answer after one automatic resend. Run the command the hint prints: the same command with the printed --request-id, or with --request FILE the same command again, since the file carries its ID. Or wirk query receipt=ID
missing_routeThe service answered 404 without an envelope: it does not have that route yet
unexpected_redirectThe service answered with a redirect; nothing was sent there
service_errorAn answer that is not from WIRK, such as an edge error page
storage_failedStorage refused an upload or download link; nothing was stored. Run the command the hint prints
insecure_token_fileA token file is readable by others, is a link, or belongs to another user. chmod 600 it

A CLI usage error caught before sending, such as an edit without @N or an unknown command, uses invalid_input and exits with 2. Text goes to standard error as Error invalid_input: <message>, followed by a hint when present; standard output is empty. With --json, the client error envelope goes to standard output, with code and message in errors and an optional hint; standard error is empty. See CLI and MCP.

Example of a client error:

Error outcome_unknown: https://api.wirk.life did not answer (timed out after 60 s); request w-3f9a2c41d0 may or may not have been applied.
  Run the same command again with --request-id w-3f9a2c41d0: it applies once or returns the stored receipt. Or: wirk query receipt=w-3f9a2c41d0

This page as Markdown · every page in one file