StatusCodes (enum)
Returned in responses (e.g. approval, trade) for programmatic handling:Trade failure actions (contractErrorActions)
Whentrade() fails, check result.action and handle accordingly:
Example:
DZapTransactionResponse
Thetrade() response shape:
status === TxnStatus.success before using txnHash. Use errorMsg for user-facing messages.
Next steps
- Enums reference - Services, TxnStatus, ApprovalModes
- Execute trade - Error handling and TRY_ANOTHER_ROUTE retry