Error Reference
Every OnsideKit error type, its cases, what causes them, and how to handle them.
OnsideKit reports failures with small typed enums. Switch over the cases — they are not LocalizedError, so localizedDescription is generic.
Common causes
Many cases share a meaning across error types:
loginDiscarded
The user dismissed a required login screen.
cancelled
The operation was cancelled (by the user or stop()).
presentationFailed
OnsideKit couldn't present the purchase UI — no active window scene was available (e.g. the app was backgrounded). The purchase never started; retry once the app is in the foreground.
connectionError
Network failure — usually retryable.
serviceUnavailable
Server returned 5xx — retry later.
appNotRegistered
The app/install isn't recognized by Onside (HTTP 404) — check your app registration/configuration.
invalidProductIdentifier
The products request was rejected (HTTP 422).
internalError
Parsing or other unexpected error.
notLoggedIn
The operation requires an authenticated user.
notSupportedInLocalTesting
Unavailable while running with a .storekit configuration.
Errors by type
OnsideLoginError
loginDiscarded
OnsideProductsRequestError
cancelled, connectionError, appNotRegistered, invalidProductIdentifier, serviceUnavailable, internalError
OnsideSignedInAppsHistoryRequestError
notLoggedIn, notSupportedInLocalTesting, cancelled, connectionError, appNotRegistered, serviceUnavailable, internalError
OnsidePaymentMethodsManagerError
loginDiscarded, notSupportedInLocalTesting
OnsidePaymentQueueAddProductError
loginDiscarded
OnsidePaymentQueueRequestRestoreError
loginDiscarded
OnsidePaymentTransactionError
cancelled, presentationFailed
OnsideTransactionsRestoreError
cancelled, connectionError, appNotRegistered, serviceUnavailable, internalError
OnsideAttributionMetadataError
connectionError, appNotRegistered, serviceUnavailable, internalError
Where each is delivered
OnsideLoginError—Onside.requestLogin(completion:)OnsideProductsRequestError—OnsideProductsRequestDelegate.onsideProductsRequest(_:didFailWithError:)OnsideSignedInAppsHistoryRequestError—Onside.makeSignedInAppsHistoryRequest()result and its request delegateOnsidePaymentMethodsManagerError—Onside.presentPaymentMethodsManager(completion:)OnsidePaymentQueueAddProductError—OnsidePaymentQueue.add(_:completion:)OnsidePaymentQueueRequestRestoreError—OnsidePaymentQueue.restoreCompletedTransactions(completion:)(pre-flight)OnsidePaymentTransactionError—OnsidePaymentTransaction.erroron a.failedtransactionOnsideTransactionsRestoreError—onsidePaymentQueue(_:restoreCompletedTransactionsFailedWithError:)OnsideAttributionMetadataError—Onside.getAttributionMetadata(completion:)
Last updated
Was this helpful?