QueryError
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.
Example
Section titled “Example”try { await result.next()} catch (error) { if (error instanceof QueryError && error.kind === "cursor") { // The page is gone — start the query over. }}Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new QueryError(
kind,code,query,data,detail?):QueryError
Defined in: src/query/errors.ts:108
Parameters
Section titled “Parameters”number
string
unknown
detail?
Section titled “detail?”string
Returns
Section titled “Returns”QueryError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”
readonlycode:number
Defined in: src/query/errors.ts:102
The JSON-RPC error code.
readonlydata:unknown
Defined in: src/query/errors.ts:104
The machine-readable detail the node sent, if any — e.g. { position, expected, got }.
readonlykind:QueryErrorKind
Defined in: src/query/errors.ts:100
Which failure this is.
readonlyquery:string
Defined in: src/query/errors.ts:106
The query string that was rejected.