What the error means
Error Code: BuySlippageBelowMinTokensOut. Error Number: 6042. Error Message: Slippage: Would buy less tokens than expected min_tokens_out
The buy, sized in SOL, would return fewer tokens than the minimum your slippage setting allows, because the price rose before it ran.
| Where it comes from | pump.fun bonding curve program |
| Code | 6042 (0x179a) |
How to fix it
- Raise slippage slightly or buy a smaller amount.
- Raise the priority fee to land earlier.
- Retry with a fresh quote.
If that is not it
- This is the SOL-in version of slippage; 6002 is the tokens-out version.
More fixes: how to decode any Solana error code and why Solana transactions fail.
Source
Error text and code from pump.fun program IDL (pump-fun/pump-public-docs, idl/pump.json), read on 24 October 2026.

