runTree either returns a TreeSummary or throws one error: SdkError in Swift, SdkException in Kotlin. Both have the same cases.
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’ssessionId. Never send cookies, tokens or user data.