why_failed
Run whenever a Solana transaction or dry run fails, before retrying. Retrying without knowing why just burns fees. Turns a Solana error (hex code, log line or RPC error object) into the plain cause and the fix. Works offline, no chain call. Inputs: error: The error exactly as you got it: "custom program error: 0x1771", "InsufficientFundsForRent", or the RPC error object. program (optional): The program that failed. Needed to read custom error codes correctly. Cost: 25 free calls a day, then $0.01 USDC per call (x402). Full field-by-field docs: GET /api/tools/why_failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | Yes | The error exactly as you got it: "custom program error: 0x1771", "InsufficientFundsForRent", or the RPC error object. From your send or RPC error, a dry-run result, a wallet message, or history. | |
| program | No | The program that failed. Needed to read custom error codes correctly. From the log line "Program <address> failed", or from explain_tx. |