Skip to main content

SDK Error Handling

Common failure classes

Failure classWhere it appearsRecovery
Validation errorLocal SDK usageFix the request shape before retrying
Hosted interactive handoffInteractive verifier in a custom flowRedirect to hosted verify or use VerifyGate
Async processingProof not finished yetPoll status with backoff
Private proof auth requiredOwner-only readsRe-authenticate the owner and retry
Upstream outageAuth/session BFF routesRespect Retry-After and surface a retry path

Polling example

const final = await client.pollProofStatus(proofId, {
  interval: 3000,
  timeout: 60000
});

Private proof read example

const privateData = await client.getPrivateStatus(proofId, window.ethereum);

Recommendations

  • Do not spam verification creation on ambiguous failures.
  • Keep proof receipt IDs so you can resume polling or display the proof later.
  • Surface interactive verifier requirements clearly; don’t hide hosted handoffs behind generic error copy.