@@ -392,7 +392,28 @@ const Home: React.FC = () => {
392392 const data = await res . json ( ) ;
393393 setProofData ( JSON . stringify ( data , null , 2 ) ) ;
394394 } catch ( e : any ) {
395- setProofError ( e . message ) ;
395+ // Check if it's a connection error (API not running)
396+ if (
397+ e . message . includes ( "fetch" ) ||
398+ e . message . includes ( "Failed to fetch" ) ||
399+ e . message . includes ( "ECONNREFUSED" )
400+ ) {
401+ setProofError ( `Prover API is not setup. Please check how to setup local prover API to run this feature.
402+
403+ Setup Instructions:
404+ 1. Navigate to circuits/script directory
405+ 2. Set environment variables (if using Succinct Prover Network):
406+ export SP1_PROVER=network
407+ export NETWORK_PRIVATE_KEY=your_private_key
408+ 3. Run the prover server:
409+ cargo run --release --bin prover
410+
411+ The server will start on port 3001. You can also run without environment variables for local proving (slower but works).
412+
413+ For more details, see: circuits/README.md` ) ;
414+ } else {
415+ setProofError ( e . message ) ;
416+ }
396417 } finally {
397418 setProofLoading ( false ) ;
398419 setStatus ( "Ready." ) ;
@@ -792,7 +813,9 @@ const Home: React.FC = () => {
792813 { proofError && (
793814 < div className = "bg-red-900/20 border border-red-500 rounded p-3" >
794815 < div className = "text-red-400 font-medium" > Proof Error:</ div >
795- < div className = "text-red-300 text-sm" > { proofError } </ div >
816+ < div className = "text-red-300 text-sm whitespace-pre-line" >
817+ { proofError }
818+ </ div >
796819 </ div >
797820 ) }
798821
0 commit comments