Errors
Every error the API returns, whether a retry is safe, and what to do about it.
An error tells you three things: what went wrong, whether trying again can work, and whether the failed call may still have changed something. This page lists every error on both transports, with its name in the Go and TypeScript SDKs. Over HTTP, an error is a status code and a JSON body:
{
"error": "writer: append at 2, expected 3",
"tail": {
"seq_num": 3,
"timestamp_ms": 1795359513525
}
}error is for people, and its wording can change. A program branches on the
status code, the fields beside error, and the reason word where there is
one. Over gRPC, a program branches on the status code and its typed detail.
The error body
Every 503 also carries the header Retry-After: 1. An error inside a
session arrives as the terminal frame, with the same
status and body. A subscription that fails after it started
just ends; the next request reports the error.
Every error
Retryable means the same request can succeed later without changes. May have applied means the failed call may still have changed something, so a retry can repeat it.
| Error | HTTP | gRPC | Retryable | May have applied | What to do |
|---|---|---|---|---|---|
| Malformed request | 400 | INVALID_ARGUMENT | No | No | Fix the request |
| Batch too large | 400, batch_too_large | INVALID_ARGUMENT + BatchTooLarge | No | No | Split the batch |
| Body too large | 413 | RESOURCE_EXHAUSTED, a message past 2 MiB | No | No | Send less, and bytes as body_b64 |
| Position on a scalable stream | 400, position_per_range | FAILED_PRECONDITION + RangeRequired | No | No | Start from a bookmark, the beginning, the tail, or a time |
| Delay on a key-ordered queue | 400, delay_on_key_ordered | INVALID_ARGUMENT + DelayOnKeyOrdered | No | No | Send it without a delay |
| Bad queue settings | 400 | INVALID_ARGUMENT | No | No | Fix the settings |
| Bad message | 400 | INVALID_ARGUMENT | No | No | Fix the message |
| Malformed claim | 400, claim_refused | INVALID_ARGUMENT + WorkRefused | No | No | Fix the claim or the value |
| No valid credential | 401 | UNAUTHENTICATED | No | No | Get a new token |
| No grant | 403 | PERMISSION_DENIED | No | No | Use a token with the grant |
| Not found | 404 | NOT_FOUND | No | No | Create it, or fix the address |
| Already exists | 409 | ALREADY_EXISTS | No | No | Retry with the first creation_token, or use another address |
| A queue's address | 409, queue_address | FAILED_PRECONDITION + QueueAddress | No | No | Use the queue routes |
| Claim not held | 409, claim_refused | FAILED_PRECONDITION + WorkRefused | No | No | Read the refusal |
| Records trimmed | 410 | OUT_OF_RANGE | No | No | Read from the beginning, or set clamp |
| Sequence miss | 412, with tail | OUT_OF_RANGE + Sequence | No | No | Check your records are not there, then use tail.seq_num |
| Fenced out | 412, with fencing_token | FAILED_PRECONDITION + Fence | No | No | Stop writing, or take over with the installed token |
| Busy, or a limit reached | 429 | RESOURCE_EXHAUSTED | Yes | No | Wait retry_after_ms, or back off |
| Not the leader | Never | FAILED_PRECONDITION + NotOwner | Yes | No | Send to holder_addr |
| Unavailable for now | 503 | UNAVAILABLE, FAILED_PRECONDITION, ABORTED | Yes | Maybe, for an append or a send | Wait Retry-After, then retry |
| Purge failed part way | 503, with purged | UNAVAILABLE + PurgeResponse | Yes | Yes | Run the purge again |
| Not served here | 501 | UNIMPLEMENTED | No | No | Use a host that serves it |
| Server error | 500 | INTERNAL, UNKNOWN | No | Maybe | Report it; see below |
Each error has a name in the SDKs. SDK errors shows how to check for each one in code:
| Error | Go | TypeScript |
|---|---|---|
| Malformed request | ErrRecordTooLarge | RecordTooLargeError |
| Batch too large | ErrBatchTooLarge | BatchTooLargeError |
| Body too large | ErrRecordTooLarge, ErrBatchTooLarge | RecordTooLargeError, BatchTooLargeError |
| Position on a scalable stream | ErrPositionPerRange | PositionPerRangeError |
| Delay on a key-ordered queue | ErrDelayOnKeyOrdered | DelayOnKeyOrderedError |
| Bad queue settings | ErrInvalidQueueConfig | InvalidQueueConfigError |
| Bad message | ErrMessage | MessageError |
| Malformed claim | *ClaimRefusedError | ClaimRefusedError |
| No valid credential | ErrUnauthenticated | UnauthenticatedError |
| No grant | The gRPC status | TransportError |
| Not found | ErrStreamNotFound | StreamNotFoundError |
| Already exists | The gRPC status; ErrQueueExists for a queue | TransportError; QueueExistsError for a queue |
| A queue's address | ErrQueueAddress | QueueAddressError |
| Claim not held | *ClaimRefusedError | ClaimRefusedError |
| Records trimmed | ErrTrimmed | TrimmedError |
| Sequence miss | *SequenceError, matching ErrSequence | SequenceError |
| Fenced out | *FenceError, matching ErrFencedOut | FenceError |
| Busy, or a limit reached | Retried, then ErrUnavailable | Retried, then UnavailableError |
| Not the leader | Followed for you | Followed for you |
| Unavailable for now | Retried, then ErrUnavailable | Retried, then UnavailableError |
| Purge failed part way | *PurgeError | PurgeError |
| Not served here | The gRPC status | TransportError |
| Server error | The gRPC status | TransportError |
A node or the Gateway follows a NotOwner redirect for an HTTP caller. If
the leader has moved again by then, the answer is 503.
The SDKs add three errors of their own:
| Error | Go | TypeScript | Retryable | May have applied | What to do |
|---|---|---|---|---|---|
| The connection broke after the append was sent | ErrUnknownOutcome | UnknownOutcomeError | With care | Maybe | Check the tail and read before you send again |
| The producer ended before it sent this append | ErrNotAppended | NotAppendedError | Yes | No | Send it again on a new producer |
| The call needs gRPC, and the client uses HTTP | ErrWireOnly | WireOnlyError | No | No | Use a gRPC client |
In Go, match a sentinel with errors.Is and a type with errors.As. In
TypeScript, use instanceof. Each keeps the server's words in its message.
Today the SDKs read every INVALID_ARGUMENT without a typed detail as
ErrRecordTooLarge / RecordTooLargeError. So a missing timestamp or a bad
header surfaces under that name. Read the message for the cause.
The SDKs retry the retryable errors for you within their retry budget, 30 seconds by default. A send retries only when it cannot have stored its messages. Appends explains how to make an append safe to retry, and Send does the same for a queue.
When Nova slows you down instead
Some limits make a call wait. You see more latency, and no error:
| When | What you see |
|---|---|
| A producer's session window is full | The next append waits until acknowledgements free room |
| A node's write buffers are full | Appends wait; latency rises |
| A stream is past its throughput limit | The producer is slowed down to the limit |
And some fail fast so that you retry elsewhere or later:
| When | What you see |
|---|---|
| A node holds as many sessions or subscriptions as it will | The open fails with RESOURCE_EXHAUSTED |
| A node holds as many one-shot appends as it will | The append fails with RESOURCE_EXHAUSTED "busy, retry" before it is read, and nothing was appended |
| A node is short of memory | New calls and session opens fail with RESOURCE_EXHAUSTED "busy, retry"; open sessions pause |
| A node is very short of memory | The sessions holding the most end with UNAVAILABLE "busy, retry" once their earlier batches are answered |
A "busy, retry" refusal carries a hint of 1 to 2 seconds, retry_after_ms
over HTTP and a RetryInfo detail over gRPC. The SDKs wait at least that
long. Backpressure explains why each wait
exists, and Node limits lists the
numbers.
Server errors that are client mistakes
A 500 normally means a bug in Nova. Today these client mistakes also answer
500, so treat them as 400:
| Request | Today's error |
|---|---|
| A fencing token longer than 36 bytes | 500 |
| A record or a message with more than 64 headers, through the Gateway | 500, protocodec: … more than 64 headers |
| A bucket name that breaks the naming rule | 500 |
A stream key longer than 512 bytes or with a control character, timestamping_uncapped with age retention, or a bad initial_ranges | 500 |
An append to an express stream on a cluster with no Express storage | 500 |
Over gRPC, the header case is INTERNAL. Everything else in this table is
UNKNOWN.