capi
capi copied to clipboard
safeguard against invalid string supplied to `chain.blockHash`
How might we error out in cases such as the following?
chain
.blockHash("a peanut butter chicken jelly tuna sandwich")
.block()
This rune's signature looks like so:
BlockRune<{
connection: Connection;
metadata: FrameMetadata;
}, ConnectionError | ServerError | null>
Should we create a new error type? InvalidBlockHashError
and unhandle it such that we get the following in the U
track?
- ConnectionError | ServerError | null
+ ConnectionError | InvalidBlockHashError | ServerError | null