Skip to content

UnsupportedOperatorError

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

A predicate asked for an operator the query language does not define for that type.

The operator × type matrix is part of the language, not a policy: a prefix test on a type other than str is a type error at the node (a QueryError of kind "type"), not an empty result. Catching it here turns a round trip and an RPC error code into a stack trace pointing at the call site.

= < <= > >= BETWEENSTARTSWITH
stryesyes
every other indexable typeyesno
  • Error

new UnsupportedOperatorError(attributeName, operator, tag, hint?): UnsupportedOperatorError

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

string

string

"bool" | "bytes" | "key" | "i32" | "u64" | "u256" | "dec" | "str" | "addr"

string

UnsupportedOperatorError

Error.constructor

readonly attributeName: string

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

The attribute the predicate names.


readonly operator: string

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

The operator, as it would have been written in the query.


readonly tag: "bool" | "bytes" | "key" | "i32" | "u64" | "u256" | "dec" | "str" | "addr"

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

The type of the value it was applied to.