Skip to main content
CosmJS surfaces errors at every stage of a transaction’s lifecycle — from building and signing through broadcasting and on-chain execution. CosmJS defines two dedicated error classes for the broadcast/execution lifecycle. All other errors are thrown as plain Error instances with descriptive messages.

TimeoutError

Thrown when a transaction is successfully submitted to the node but is not included in a block before the timeout expires (default: 60 seconds). The transaction may still succeed later.
The txId property lets you query the transaction later:
You can increase the timeout when broadcasting:
Or set it globally via client options:

BroadcastTxError

Thrown when the node rejects a transaction during CheckTx — before the transaction enters the mempool. This is a definitive rejection; the transaction will not be included in a block.
Common causes include invalid addresses, insufficient fees, badly formed messages, and sequence mismatches: