Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

Defined in: src/query/errors.ts:98

The node rejected a query.

These codes are part of the frozen arkiv_query surface, so kind and data are stable enough to branch on — which the underlying JSON-RPC error is not, because the codes overlap Ethereum’s own EIP-1474 numbering and get wrapped accordingly on the way up.

try {
await result.next()
} catch (error) {
if (error instanceof QueryError && error.kind === "cursor") {
// The page is gone — start the query over.
}
}
  • Error

new QueryError(kind, code, query, data, detail?): QueryError

Defined in: src/query/errors.ts:108

QueryErrorKind

number

string

unknown

string

QueryError

Error.constructor

readonly code: number

Defined in: src/query/errors.ts:102

The JSON-RPC error code.


readonly data: unknown

Defined in: src/query/errors.ts:104

The machine-readable detail the node sent, if any — e.g. { position, expected, got }.


readonly kind: QueryErrorKind

Defined in: src/query/errors.ts:100

Which failure this is.


readonly query: string

Defined in: src/query/errors.ts:106

The query string that was rejected.