Skip to content

Errors

A SealdHealthcareError signals a protocol fault, a trust failure or a state your application must handle. It is never a decision. Every SealdHealthcareError carries one code from the fixed list below. retryable says whether the same call may succeed later with no change on your side.

SealdHealthcareError

interface SealdHealthcareError extends Error {
code: ErrorCode;
retryable: boolean;
}

Catching an error

try {
await client.session.signIn();
} catch (error) {
const sealdHealthcareError = error as SealdHealthcareError;
if (sealdHealthcareError.code === 'release-below-floor') tellToUpdate();
else if (sealdHealthcareError.retryable) scheduleRetry();
else throw error;
}

Every code

CodeSwiftKotlinRetryableMeaningWhat to do
locked.lockedErrorCode.LOCKEDNoThe device key is locked. Unlock it first.Ask for the person’s secret through the unlock adapter and retry.
no-session.noSessionErrorCode.NO_SESSIONNoNo session is open, or it ended.Call session.signIn().
sign-in-required.signInRequiredErrorCode.SIGN_IN_REQUIREDNoThe tenant requires the identity provider on resume, or the token’s refresh was refused.Call session.signIn() rather than resume().
revoked.revokedErrorCode.REVOKEDNoThe device certificate (card) of this device is no longer active. The SDK has already discarded its offline lease and locked the device key.Show that the device is revoked. Enroll a new one.
release-below-floor.releaseBelowFloorErrorCode.RELEASE_BELOW_FLOORNoThe application’s version is below what the tenant requires.Tell the person to update through the application’s own channel.
contract-retired.contractRetiredErrorCode.CONTRACT_RETIREDNoThe Seald Healthcare Cloud no longer serves the Cloud API version this SDK uses.Ship a release built on a current SDK.
unreachable.unreachableErrorCode.UNREACHABLEYesThe Seald Healthcare Cloud cannot be reached. What the offline lease covers still opens.Retry once reachable. The reachable event says when.
storage-unreachable.storageUnreachableErrorCode.STORAGE_UNREACHABLEYesThe customer’s storage did not answer or refused the request.Retry the call. A persistent failure lies in the customer’s storage, not in Seald Healthcare.
container-invalid.containerInvalidErrorCode.CONTAINER_INVALIDNoThe stored object is damaged, belongs to a different object or version, or its key does not open it.Treat the object as unreadable. Do not retry with it.
trust-failed.trustFailedErrorCode.TRUST_FAILEDNoA card, an identity authority or a registration failed its check against the trust root built into the SDK, or names another tenant.Stop the flow and show a trust error. Do not retry.
fingerprint-mismatch.fingerprintMismatchErrorCode.FINGERPRINT_MISMATCHNoThe tenant’s backup key registration names a key other than the one this SDK pinned.Stop and tell an administrator. Do not proceed on this device.
journal-refused.journalRefusedErrorCode.JOURNAL_REFUSEDNoThe Seald Healthcare Cloud refused the record of what this device opened offline. It has already discarded its offline lease and locked the device key.Show that the device waits on review. Nothing to retry locally.
canceled.canceledErrorCode.CANCELEDNoThe person did not complete the unlock or the sign-in the operation needed.Let the person try again when ready.
enrollment-rejected.enrollmentRejectedErrorCode.ENROLLMENT_REJECTEDNoAn approver rejected the enrollment request.Show the rejection. The person starts a new request.
enrollment-lapsed.enrollmentLapsedErrorCode.ENROLLMENT_LAPSEDNoAn enrollment request lapsed unanswered.Show that it lapsed. The person starts a new request.
not-found.notFoundErrorCode.NOT_FOUNDNoThe SDK does not hold what the call names, such as a tenant, a draft or a request.Refresh the view the id came from. Do not retry with the same id.
protocol.protocolErrorCode.PROTOCOLYes when rate-limited, no otherwiseThe Seald Healthcare Cloud answered with its own fault: a malformed request, too many requests, or a state that changed and could not be retried.Back off and retry when rate-limited. Otherwise, report it as a bug.