Update error handling in verifier and improve error message display in VerificationModal
All checks were successful
CI / build (push) Successful in 1m0s
renovate / renovate (push) Successful in 1m14s

- Updated the error handling in loadVerifier to log detailed errors and provide clearer feedback on WASM script loading issues.
- Modified the error message display in VerificationModal to better format and separate error details for improved user experience.
This commit is contained in:
2025-12-27 22:45:57 -06:00
parent 1687815aad
commit 55eaf28514
2 changed files with 14 additions and 2 deletions

View File

@@ -400,7 +400,16 @@
</div>
<div class="text-center px-4">
<p class="font-bold text-lg leading-tight">Verification Failed</p>
<p class="text-xs text-muted-foreground mt-1">{errorMessage}</p>
{#if errorMessage.includes('(')}
<p class="text-sm font-bold mt-1">
{errorMessage.split(' (')[0]}
</p>
<p class="text-[10px] text-muted-foreground mt-0.5 italic">
({errorMessage.split(' (')[1]}
</p>
{:else}
<p class="text-xs text-muted-foreground mt-1">{errorMessage}</p>
{/if}
</div>
</div>

View File

@@ -12,7 +12,10 @@ export async function loadVerifier() {
script.integrity = 'sha384-PWCs+V4BDf9yY1yjkD/p+9xNEs4iEbuvq+HezAOJiY3XL5GI6VyJXMsvnjiwNbce';
script.crossOrigin = 'anonymous';
script.onload = () => resolve();
script.onerror = () => reject(new Error('Failed to load WASM executor script'));
script.onerror = (e) => {
console.error('WASM executor script load error:', e);
reject(new Error('Failed to load WASM executor script (SRI mismatch or network error)'));
};
document.head.appendChild(script);
});
}