---
title: "Errors"
description: "Every error code the forge answers with, what it means, and whether making the request again can help."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.forge.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

<!-- Generated by tools/gen-reference.mjs from `the ErrorCode enum`. Change the enum's comments in crates/atoll-forge-proto/proto/atoll/forge/v1/forge.proto, then run `npm run gen:reference`. -->

When the forge refuses or fails a request, `af` prints `Error:`, the code and the forge's message, and exits with status 1, as in `Error: InvalidState: there is nothing to redo: your last operation was no undo`. An agent's tool call fails with the same code and message. The message says what in particular went wrong; the code says what kind of thing it is, and whether making the request again can help.

| Code | Number |
| --- | --- |
| [`BadRequest`](#bad-request) | 1 |
| [`NotFound`](#not-found) | 2 |
| [`InvalidState`](#invalid-state) | 3 |
| [`Internal`](#internal) | 4 |
| [`Unauthenticated`](#unauthenticated) | 5 |
| [`PermissionDenied`](#permission-denied) | 6 |
| [`Unavailable`](#unavailable) | 7 |
| [`Sealed`](#sealed) | 8 |

## BadRequest {#bad-request}

The request is malformed: a bad pattern, revset, path, key or argument. Made again unchanged, it fails the same way; the message says what to correct.

## NotFound {#not-found}

What the request names does not exist: a change, a commit, an operation, a file or a record. Check the ID; a change can be named by the start of its ID, as `af log` shows it.

## InvalidState {#invalid-state}

What the request names is not in a state that allows it: a change that is not open, a commit that is no longer its change's latest, a page whose log has changed since, or an undo of a change written since. Made again unchanged, it is answered the same; the message says what is current, to make the request again on that.

## Internal {#internal}

The forge failed in a way it does not expect, such as data that does not decode. The message says what failed; tell the forge's operator, who finds it in the node's log.

## Unauthenticated {#unauthenticated}

The connection acts for no live actor: it has not proven one, or its actor has been stopped or has expired. Sign in again, or have the agent born again.

## PermissionDenied {#permission-denied}

The connection's actor may not make this request: a role it lacks, a restricted folder, another actor's operation to undo, contents purged. Made again unchanged, it is refused again.

## Unavailable {#unavailable}

The forge cannot answer now, and can shortly: the node's replication stopped and starts again, the group's leader is not yet taking writes, or the repository is still being imported. What a refused write did is said only where the forge knows it, and only of the attempt the message names: "not made:" says that attempt never reached the group's leader; "may have been made:" says it may have taken effect there. An upload refused after some of its objects were stored begins "partly made:" and says which were; no other message says what a request that writes in steps had made before it was refused. Before making a write again, look at what it would change, unless making it twice does no harm; the forge never makes it again on its own.

## Sealed {#sealed}

The node is sealed: it answers only the vault's requests until it is unsealed (decision 88). Unseal it with the recovery shares, or reach another node.

Source: https://docs.forge.workreef.dev/reference/errors/index.mdx
