Skip to content

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

InvalidValueError

Defined in: src/attr/errors.ts:10

A value was rejected by its tagged constructor — out of range, wrong length, bad checksum, too much precision, and so on.

The message names the offending value and, where there is one, the type that would hold it, so the fix is in the error rather than in the docs.

  • Error

new InvalidValueError(tag, input, reason, hint?): InvalidValueError

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

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

unknown

string

string

InvalidValueError

Error.constructor

readonly input: unknown

Defined in: src/attr/errors.ts:14

The rejected input, as given.


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

Defined in: src/attr/errors.ts:12

The type tag whose constructor rejected the value.