Reading Envelope Errors
Goal: When a tool call fails, understand what went wrong and what
to do next.
When to use this: Any time you get ok: false from a tool. Bookmark
this — it's the cross-cutting primer the other runbooks reference.
Anatomy of an error envelope
{
"v": "0.1",
"ok": false,
"operation": "ovstorage_read",
"resource": "s3://my-bucket/missing.bin",
"error": {
"code": "NotFound",
"message": "NotFound: object missing at s3://my-bucket/missing.bin",
"retryable": false,
"next_action": "Add a matching connection to ovstorage.toml and restart the host."
}
}
The fields you care about, in order of usefulness:
1. `error.code` — the canonical reason
A stable string identifying the failure category. Pin your branching
on this, not on error.message. Common codes:
| Code | Meaning |
|---|---|
| NotFound | Address doesn't exist |
| AlreadyExists | Destination is taken (write with if_dest: {"kind": "fail"}) |
| PermissionDenied | Auth allows the call but not on this resource |
| AuthRequired / CredentialExpired | Connection needs auth refresh |
| NoRoute / NotConfigured | No backend serves this address and no anonymous fallback is granted for its scheme |
| Unsupported | Backend exists but doesn't support this op |
| PreconditionFailed | A write-side if_match / if_dest precondition failed before anything was committed |
| ObjectModified | The object changed during a call already under way, or a read's if_match failed |
| ResourceExhausted | Hit a cap (max_bytes, quota, rate) |
| InvalidArgument | The arguments you passed are wrong |
| Transient / BrokerUnavailable / ResourceExhausted / DeadlineExceeded | Backend hiccup, cap, or throttling; retry-friendly |
| Cancelled | The call was cancelled (Ctrl+C, timeout, etc.) |
Full list and meanings: see ErrorCode in