failedSingleTransactionPlanResult
Creates a failed SingleTransactionPlanResult from a transaction message and error.
This function creates a single result with a 'failed' status, indicating that the transaction execution failed. It includes the original transaction message and the error that caused the failure.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TContext extends TransactionPlanResultContext | TransactionPlanResultContext | The type of the context object (not used in failed results) |
TTransactionMessage extends Readonly<{ instructions: readonly Instruction<string, readonly ( | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string> | Readonly<{ instructions: readonly Instruction<string, readonly ( | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string> | The type of the transaction message |
Parameters
| Parameter | Type | Description |
|---|---|---|
transactionMessage | TTransactionMessage | The original transaction message |
error | Error | The error that caused the transaction to fail |
Returns
SingleTransactionPlanResult<TContext, TTransactionMessage>