Skip to main content

errors

Read your driver's error occurrences from the terminal, scoped to the controller and the exact version you just deployed.

Usage​

driverforge errors [options]

errors lists individual error occurrences, oldest first, each with its message, error type, stack trace and the arguments of the event it was raised in. Occurrences are listed one by one, not grouped the way the web app's errors view groups them, so you see every time it happened. To read the group, run driverforge get <ref> with the ref an error carries.

It works exactly like driverforge logs: the same scope rules, versions, waiting and following, output and exit statuses.

Prerequisites​

  • You're signed in (driverforge login)
  • Your driver uses the Anvil SDK and the Anvil Agent is installed on the controller

Options​

OptionDescription
--orgOrganization slug, name or id
--projectProject slug, name or id
--deviceController name, hostname, hardware id or id
--versionA version number or latest
--sinceStart of the window: a duration (30s, 10m, 2h) or an RFC 3339 time
--untilEnd of the window, in the same forms
--tailHow many of the newest occurrences to return (default 100, at most 1000)
--beforePage back from the next_cursor of a previous response
--grepRegular expression matched against the message and the error's details
--ignore-case, -iMake --grep case-insensitive
--correlation-idOnly errors raised in one event (its trace id)
--fieldA key=value facet filter; repeatable. Keys: controller, driver
--until-matchWait until an error matching this regular expression arrives
--min-eventsWait until this many errors match
--timeoutLongest wait (default 30s when waiting, at most 10m)
--follow, -fStream errors as they arrive, until interrupted or --timeout
--output, -otext, json or jsonl
--max-payload-bytesCap each error's details (default 65536; 0 for no cap)

What each error carries​

The error's message is the entry's message. Its payload holds the details as recorded: the error type, the stacktrace, the args of the event it was raised in, and the lastLog line the driver logged before it. The correlation_id is the trace id of that event, so you can pull everything around an error:

driverforge logs --correlation-id <id>

Its ref is the reference of the error group it belongs to, such as POOL-PUMP-4F2A9C1B, or null if its fingerprint can't form one. Pass it to driverforge get for the group's history: how often the error has occurred, since when, and on which versions and controllers. To start from the latest error:

driverforge errors --tail 1
driverforge get <ref>

Output​

In a terminal the output is for reading. Under a coding agent, or with DRIVERFORGE_OUTPUT=json, the result is one JSON document on stdout and progress is one JSON object per line on stderr.

scope: org=acme project=pool-pump device=Living Room version=20261105.2

2026-11-05T03:12:44.231Z ERROR v20261105.2 ExecuteCommand POOL-PUMP-4F2A9C1B attempt to index a nil value (field 'episode')
{
"type": "lua:runtime_error",
"stacktrace": "driver.lua:212: in function 'PlayEpisode'\ndriver.lua:88: in function 'ExecuteCommand'",
"args": ["PLAY", {}],
"lastLog": "playing episode 4812"
}

Warnings​

A read that succeeds can still carry warnings, each with a stable code:

CodeMeaning
no_entriesNothing matched the scope and filters.
retention_clamped--since reaches past your plan's retention; only the last details.window_minutes were searched.
tail_clamped--tail is over the maximum; the newest page was returned. Page further with --before.
payload_truncatedSome entries were cut at --max-payload-bytes. Each is listed in details.entries; driverforge get fetches it in full.
device_not_reportingThe controller hasn't reported to Driverforge for 5 minutes or more; details.last_seen_at is when it last did (RFC 3339, UTC). Empty results from a controller that isn't reporting say nothing about the driver: check the controller first.

A wait that times out on a controller that isn't reporting still exits 3; its wait_timeout error carries details.device_not_reporting: true and details.last_seen_at, and its hint says to check the controller and its Anvil agent rather than to wait longer.

Examples​

Errors from the last deploy:

driverforge errors --version 2026110502

Errors from the last ten minutes on one controller:

driverforge errors --device bench-a --since 10m

Wait for an error after triggering an action, and fail if none arrives:

driverforge errors --version 2026110502 --min-events 1 --timeout 60s

Global flags​

Every driverforge command also accepts these global flags: --verbose/-v, --project-dir, --no-tui, --no-update-check, and --help/-h. See the overview for details.