Errors

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:

412 Precondition Failed
{
  "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

errorstring
What went wrong, in words
reasonstring
A stable word for the errors a program branches on: batch_too_large, position_per_range, partial_append, queue_address, delay_on_key_ordered, or claim_refused
tailobject
On a match_seq_num miss: the stream's tail, the next position to try
fencing_tokenstring
On a fencing mismatch: the token installed now
fence_callerboolean
On a fencing mismatch: true when your own token was judged
partsarray
On a partial append to a scalable stream: the parts that landed, with their positions, and the parts that failed, with their status and error
refusalstring
With reason: claim_refused: why the claim was refused. See refusals
limitstring
On a 429 from a queue: the limit reached, such as max_claim_waits
purgedinteger
On a purge that failed part way: the messages it removed
retry_after_msinteger
On a 429 or 503 from a busy node: how long to wait before trying again

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.

ErrorHTTPgRPCRetryableMay have appliedWhat to do
Malformed request400INVALID_ARGUMENTNoNoFix the request
Batch too large400, batch_too_largeINVALID_ARGUMENT + BatchTooLargeNoNoSplit the batch
Body too large413RESOURCE_EXHAUSTED, a message past 2 MiBNoNoSend less, and bytes as body_b64
Position on a scalable stream400, position_per_rangeFAILED_PRECONDITION + RangeRequiredNoNoStart from a bookmark, the beginning, the tail, or a time
Delay on a key-ordered queue400, delay_on_key_orderedINVALID_ARGUMENT + DelayOnKeyOrderedNoNoSend it without a delay
Bad queue settings400INVALID_ARGUMENTNoNoFix the settings
Bad message400INVALID_ARGUMENTNoNoFix the message
Malformed claim400, claim_refusedINVALID_ARGUMENT + WorkRefusedNoNoFix the claim or the value
No valid credential401UNAUTHENTICATEDNoNoGet a new token
No grant403PERMISSION_DENIEDNoNoUse a token with the grant
Not found404NOT_FOUNDNoNoCreate it, or fix the address
Already exists409ALREADY_EXISTSNoNoRetry with the first creation_token, or use another address
A queue's address409, queue_addressFAILED_PRECONDITION + QueueAddressNoNoUse the queue routes
Claim not held409, claim_refusedFAILED_PRECONDITION + WorkRefusedNoNoRead the refusal
Records trimmed410OUT_OF_RANGENoNoRead from the beginning, or set clamp
Sequence miss412, with tailOUT_OF_RANGE + SequenceNoNoCheck your records are not there, then use tail.seq_num
Fenced out412, with fencing_tokenFAILED_PRECONDITION + FenceNoNoStop writing, or take over with the installed token
Busy, or a limit reached429RESOURCE_EXHAUSTEDYesNoWait retry_after_ms, or back off
Not the leaderNeverFAILED_PRECONDITION + NotOwnerYesNoSend to holder_addr
Unavailable for now503UNAVAILABLE, FAILED_PRECONDITION, ABORTEDYesMaybe, for an append or a sendWait Retry-After, then retry
Purge failed part way503, with purgedUNAVAILABLE + PurgeResponseYesYesRun the purge again
Not served here501UNIMPLEMENTEDNoNoUse a host that serves it
Server error500INTERNAL, UNKNOWNNoMaybeReport it; see below

Each error has a name in the SDKs. SDK errors shows how to check for each one in code:

ErrorGoTypeScript
Malformed requestErrRecordTooLargeRecordTooLargeError
Batch too largeErrBatchTooLargeBatchTooLargeError
Body too largeErrRecordTooLarge, ErrBatchTooLargeRecordTooLargeError, BatchTooLargeError
Position on a scalable streamErrPositionPerRangePositionPerRangeError
Delay on a key-ordered queueErrDelayOnKeyOrderedDelayOnKeyOrderedError
Bad queue settingsErrInvalidQueueConfigInvalidQueueConfigError
Bad messageErrMessageMessageError
Malformed claim*ClaimRefusedErrorClaimRefusedError
No valid credentialErrUnauthenticatedUnauthenticatedError
No grantThe gRPC statusTransportError
Not foundErrStreamNotFoundStreamNotFoundError
Already existsThe gRPC status; ErrQueueExists for a queueTransportError; QueueExistsError for a queue
A queue's addressErrQueueAddressQueueAddressError
Claim not held*ClaimRefusedErrorClaimRefusedError
Records trimmedErrTrimmedTrimmedError
Sequence miss*SequenceError, matching ErrSequenceSequenceError
Fenced out*FenceError, matching ErrFencedOutFenceError
Busy, or a limit reachedRetried, then ErrUnavailableRetried, then UnavailableError
Not the leaderFollowed for youFollowed for you
Unavailable for nowRetried, then ErrUnavailableRetried, then UnavailableError
Purge failed part way*PurgeErrorPurgeError
Not served hereThe gRPC statusTransportError
Server errorThe gRPC statusTransportError

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:

ErrorGoTypeScriptRetryableMay have appliedWhat to do
The connection broke after the append was sentErrUnknownOutcomeUnknownOutcomeErrorWith careMaybeCheck the tail and read before you send again
The producer ended before it sent this appendErrNotAppendedNotAppendedErrorYesNoSend it again on a new producer
The call needs gRPC, and the client uses HTTPErrWireOnlyWireOnlyErrorNoNoUse 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:

WhenWhat you see
A producer's session window is fullThe next append waits until acknowledgements free room
A node's write buffers are fullAppends wait; latency rises
A stream is past its throughput limitThe producer is slowed down to the limit

And some fail fast so that you retry elsewhere or later:

WhenWhat you see
A node holds as many sessions or subscriptions as it willThe open fails with RESOURCE_EXHAUSTED
A node holds as many one-shot appends as it willThe append fails with RESOURCE_EXHAUSTED "busy, retry" before it is read, and nothing was appended
A node is short of memoryNew calls and session opens fail with RESOURCE_EXHAUSTED "busy, retry"; open sessions pause
A node is very short of memoryThe 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:

RequestToday's error
A fencing token longer than 36 bytes500
A record or a message with more than 64 headers, through the Gateway500, protocodec: … more than 64 headers
A bucket name that breaks the naming rule500
A stream key longer than 512 bytes or with a control character, timestamping_uncapped with age retention, or a bad initial_ranges500
An append to an express stream on a cluster with no Express storage500

Over gRPC, the header case is INTERNAL. Everything else in this table is UNKNOWN.

On this page