Update error handling in verifier and improve error message display in VerificationModal
- 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:
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user