Skip to content

Commit 820f34a

Browse files
fix: improve error handling in toBigInt function (#1025)
* fix: improve error handling in toBigInt function * Update packages/proof/src/to-bigint.ts Co-authored-by: John Guilding <[email protected]> --------- Co-authored-by: John Guilding <[email protected]>
1 parent 81dbf86 commit 820f34a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/proof/src/to-bigint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export default function toBigInt(value: BigNumberish | Uint8Array | string): big
1515
return _toBigInt(encodeBytes32String(value))
1616
}
1717

18-
throw TypeError(error.message)
18+
throw TypeError(error instanceof Error ? error.message : error.toString())
1919
}
2020
}

0 commit comments

Comments
 (0)