TransactionErrorCode returned in SubmitTransaction errors and how to handle each one. Error codes are grouped by their retryability and whether the transaction was sent to the network.
TransactionErrorCode
Thecode field of a TransactionError object. Determines whether retrying the same transaction is safe, and what remediation action to take.
Error codes are grouped into three categories:
- Permanent failures — transaction was NOT sent; rebuild required before retrying
- Temporary failures — transaction was NOT sent; same transaction can be retried
- Indeterminate — unknown whether the transaction was sent; check
structured_error.certainty
Permanent Failures
The transaction was NOT sent to the network. The error condition is not recoverable with the same transaction — rebuild and re-sign before retrying.Temporary Failures
The transaction was NOT sent to the network. The same signed transaction can be retried without rebuilding.Indeterminate
The service cannot determine with certainty whether the transaction was sent to the network. Usestructured_error.certainty (a TransactionSubmissionCertainty value) to determine the recovery strategy.
TransactionSubmissionCertainty
Thecertainty field on a TransactionError object. Use this to determine whether it is safe to resubmit a transaction after an indeterminate error.
blockhash_expiry_slot on the TransactionError object indicates when the transaction’s blockhash expires (approximately 150 slots after compilation). Once the blockhash has expired, any transaction that was broadcast but not confirmed is guaranteed to be dead — it is then safe to recompile and resubmit.