Page MenuHomePhabricator

[chronik-client] Add more helpful error msg for the case of a user calling broadcastTx with broadcastTxs input
AbandonedPublic

Authored by bytesofman on Jul 19 2025, 13:35.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

Ran into this recently and the error msg is confusing and unhelpful

Test Plan

npm test, CI for chronik integration tests

Event Timeline

emack added a subscriber: emack.

Probably needs similar helpful error handling in broadcastTxs if a non-array is supplied there

This revision is now accepted and ready to land.Jul 19 2025, 14:07

add similar error catch for broadcastTxs

emack requested changes to this revision.Jul 19 2025, 14:15
emack added inline comments.
modules/chronik-client/README.md
131

updated readme since you added the error handling for broadcastTxs in this same diff

This revision now requires changes to proceed.Jul 19 2025, 14:15

actually I do not think this kind of validation check is worthwhile

JS use of this TS library should be rare. If it isn't rare .... well I don't think it's worth the performance impact of this validation check every single time we broadcast a tx.