diff --git a/packages/proof/src/to-bigint.ts b/packages/proof/src/to-bigint.ts index 4424e1860..7febdf78c 100644 --- a/packages/proof/src/to-bigint.ts +++ b/packages/proof/src/to-bigint.ts @@ -15,6 +15,6 @@ export default function toBigInt(value: BigNumberish | Uint8Array | string): big return _toBigInt(encodeBytes32String(value)) } - throw TypeError(error.message) + throw TypeError(error instanceof Error ? error.message : error.toString()) } }