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 <54913924+JohnGuilding@users.noreply.github.com>

---------

Co-authored-by: John Guilding <54913924+JohnGuilding@users.noreply.github.com>
This commit is contained in:
Galoretka
2025-08-07 15:47:56 +03:00
committed by GitHub
parent 81dbf8631c
commit 820f34ac90

View File

@@ -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())
}
}