For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

Case
Meaning

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

Error type
Cases

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

  • OnsideLoginErrorOnside.requestLogin(completion:)

  • OnsideProductsRequestErrorOnsideProductsRequestDelegate.onsideProductsRequest(_:didFailWithError:)

  • OnsideSignedInAppsHistoryRequestErrorOnside.makeSignedInAppsHistoryRequest() result and its request delegate

  • OnsidePaymentMethodsManagerErrorOnside.presentPaymentMethodsManager(completion:)

  • OnsidePaymentQueueAddProductErrorOnsidePaymentQueue.add(_:completion:)

  • OnsidePaymentQueueRequestRestoreErrorOnsidePaymentQueue.restoreCompletedTransactions(completion:) (pre-flight)

  • OnsidePaymentTransactionErrorOnsidePaymentTransaction.error on a .failed transaction

  • OnsideTransactionsRestoreErroronsidePaymentQueue(_:restoreCompletedTransactionsFailedWithError:)

  • OnsideAttributionMetadataErrorOnside.getAttributionMetadata(completion:)

Last updated

Was this helpful?