createFailedToExecuteTransactionPlanError
Creates a SolanaError with the SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN error code from a TransactionPlanResult.
This is a low-level error intended for custom transaction plan executor
authors. It attaches the full transactionPlanResult as a non-enumerable
property so that callers can inspect execution details without the result
being serialized with the error.
Parameters
| Parameter | Type | Description |
|---|---|---|
result | TransactionPlanResult | The full transaction plan result tree. |
abortReason? | unknown | An optional abort reason if the plan was aborted. |
Returns
SolanaError<7618003>
A SolanaError with the appropriate error code and context.
Example
Throwing a failed-to-execute error from a custom executor.