Skip to main content
runTree either returns a TreeSummary or throws one error: SdkError in Swift, SdkException in Kotlin. Both have the same cases.
Never retry automatically. The SDK doesn’t, and your app shouldn’t retry behind the user’s back. After any error, the user chooses whether to start again, and your backend creates a new run for that attempt.

Error cases

A switch over every case, so a new case in a later version fails your build instead of reaching users unhandled:

Reading the error text

Transport and Policy carry a text that says what went wrong. Match on its prefix and log it. Never log tokens or cookies.

Common Transport texts

Policy

A Policy error means the run’s configuration or signed documents refused the run. Retrying doesn’t help until the cause is fixed. Most are refused before any page opens, so the user sees nothing. The full list of texts is in the SDK’s error reference.

A result that did not arrive

runTree can return normally while its result never reached Cr3dentials. Then delivered is false, handedOff is false, and deliveryError says why: The data isn’t kept on the phone, so the user starts a new run. Tell your backend to terminate the old one. After a hand-off, handedOff is true and delivered is false. That’s expected: the attester posts the result itself, and your webhook tells you how the run ended.

Getting help

Email info@cr3dentials.xyz with the SDK version, the device and OS, the error case and its text, the time, and the run’s sessionId. Never send cookies, tokens or user data.