Skip to content

Commit 9a856ba

Browse files
committed
fix: error frontend
1 parent 5cfcd5a commit 9a856ba

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

app/app/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const geistMono = Geist_Mono({
1313
});
1414

1515
export const metadata: Metadata = {
16-
title: "Create Next App",
17-
description: "Generated by create next app",
16+
title: "zkPDF Compatibility Check",
17+
description:
18+
"Verify PDF signatures and check zkPDF compatibility with zero-knowledge proofs",
1819
};
1920

2021
export default function RootLayout({

app/app/page.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)