You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently at broadcast time, Jupiter swaps sometimes fail at SlippageToleranceExceeded, i.e these will show up as "Reverted during execution, Slippage Tolerance Exceeded in Phantom", but those can be sent still, however, /api/v1/send will error with 400 and return
{
"message": "Simulation failed. \nMessage: Transaction simulation failed: Error processing Instruction 3: custom program error: 0x1771. \nLogs: \n[\n \"Program LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 63802 of 130355 compute units\",\n \"Program LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\",\n \"Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [2]\",\n \"Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 471 of 64108 compute units\",\n \"Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 success\",\n \"Program log: AnchorError thrown in programs/jupiter/src/lib.rs:346. Error Code: SlippageToleranceExceeded. Error Number: 6001. Error Message: Slippage tolerance exceeded.\",\n \"Program log: Left: 155127\",\n \"Program log: Right: 156589\",\n \"Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 133535 of 191015 compute units\",\n \"Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1771\"\n]. \nCatch the `SendTransactionError` and call `getLogs()` on it for full details."
}
We do not parse these errors and display them as raw JSON in the UI, both in swapper error field as well as in the toast
This PR is to make things more human-readable by decoding this.
References and additional details
N/A
Acceptance Criteria
SlippageToleranceExceeded errors are captured and decoded in a human-readable way, reflected both in swapper as ("Slippage Tolerance Exceeded") and in the toast
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered:
For note purposes, as I did spike it a little bit:
Those solana errors happens at simulation time, so the handler is inside useTradeExecution and is not the responsibility of the swapper anymore (onFail handler)
We might need to introduce an error interceptor inside onFail to humanize those errors, to be continued
Overview
Currently at broadcast time, Jupiter swaps sometimes fail at
SlippageToleranceExceeded
, i.e these will show up as "Reverted during execution, Slippage Tolerance Exceeded in Phantom", but those can be sent still, however,/api/v1/send
will error with 400 and returnWe do not parse these errors and display them as raw JSON in the UI, both in swapper error field as well as in the toast
This PR is to make things more human-readable by decoding this.
References and additional details
N/A
Acceptance Criteria
SlippageToleranceExceeded
errors are captured and decoded in a human-readable way, reflected both in swapper as ("Slippage Tolerance Exceeded") and in the toastNeed By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered: