Skip to main content
This page focuses on IDKit SDK and bridge error codes returned during request flows.

Canonical codes

CodeMeaningTypical action
user_rejectedUser cancelled in World App.Treat as user cancellation, allow retry.
verification_rejectedLegacy rejection code (older bridge/app behavior).Handle same as user_rejected.
credential_unavailableRequested credential type is not available for that user.Offer fallback credential policy or explain requirement.
malformed_requestPayload or configuration is invalid.Check app_id, rp_context, and request shape.
invalid_networkEnvironment mismatch between app config and World App context.Align staging/production settings.
inclusion_proof_pendingCredential inclusion data is not ready yet.Retry later.
inclusion_proof_failedInclusion proof retrieval failed.Retry; if repeated, treat as operational incident.
unexpected_responseMalformed or unsupported bridge/app response.Log diagnostics and retry once.
connection_failedCould not establish/maintain bridge communication.Check connectivity and bridge reachability.
max_verifications_reachedAction already verified the maximum allowed number of times.Treat as terminal business-rule outcome.
failed_by_host_appHost app callback failed while processing a successful proof.Fix host callback/backend logic and retry.
generic_errorCatch-all unknown failure.Log details and retry with backoff.
timeoutClient-side polling timeout.Extend timeout or let the user retry.
cancelledClient-side cancellation (abort/task cancel/user close).Treat as neutral cancellation path.

Handling errors

Widgets expose an onError callback. Hooks expose isError and errorCode on the result object.
<IDKitRequestWidget
  // ...
  onError={(errorCode) => {
    console.error("IDKit error", errorCode);
  }}
/>
const flow = useIDKitRequest({ /* ... */ });

if (flow.isError) {
  console.error(flow.errorCode);
}