Tx Doctor / Solana error library / Custom program error (unknown code)
Solana error: Custom program error (unknown code)
A program rejected the transaction with an error code that only its own developers define. The logs around the failure usually reveal the reason.
Why it happens
- Each on-chain program defines its own error enum; code 6001 on one program can mean something completely different on another.
- Newer programs and forks often reuse codes without publishing a mapping.
- Most of these turn out to be slippage, a missing account, or a permission check.
How to fix it
- Read the last few log lines - programs usually print the human reason right before failing.
- Retry once with a fresh blockhash and a slightly higher priority fee; transient state causes many of these.
- If it repeats on the same action, open a support ticket with the signature - the program team can decode it instantly.
What it looks like in the logs
Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P failed: custom program error: 0x1
Seeing this error right now? Paste your transaction signature and get the exact instruction, program and code that failed.
Diagnose my transaction