Code
16
SDK error · code 16
What it means
unknownBackendError (code 16) means the server answered with an error code the SDK has no specific mapping for. The original number is in the error: read rc_backend_error_code on iOS, or the "Backend Code" text on Android. On iOS, backend codes 7110, 7226, 7259 and the Play codes also land here. Look the number up, fix that cause, and do not grant access.
Code
16
iOS (Swift)
ErrorCode.unknown
Android (Kotlin)
PurchasesErrorCode.Unknown
Causes
BackendErrorCode list gives UnknownBackendError with the text "Backend Code: N" and the server message (errors.kt). That includes 7259 and 7877.| Backend code | Meaning |
|---|---|
| 7110 | Internal server error. iOS maps it to unknownBackendError; Android maps it to unexpectedBackendResponseError. |
| 7226 | Bad request. iOS maps it to unknownBackendError; Android maps it to unexpectedBackendResponseError. |
| 7259 | Subscription or object not found. iOS maps it to unknownBackendError; Android has no mapping, so it also gives unknownBackendError. |
| 7229 | Play Store quota exceeded. iOS maps it to unknownBackendError; Android maps it to storeProblemError. |
| 7231 | Play Store generic error. iOS maps it to unknownBackendError; Android maps it to storeProblemError. |
Fix
On iOS, read rc_backend_error_code and rc_response_status_code from userInfo. On Android, read the number after "Backend Code" in underlyingErrorMessage.
Search it in the table of RevenueDot's API errors. The message the server sent explains the cause.
For a 7259, create or fix the customer, entitlement or offering that does not exist. For a 7110, read the server log.
A newer SDK maps more backend codes to specific errors, which makes the cause easier to see.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .unknownBackendError {
// handle unknown backend error
}
// Kotlin
if (error.code == PurchasesErrorCode.UnknownBackendError) { /* ... */ } On RevenueDot: RevenueDot answers 7259 (404) when a customer, entitlement, offering or subscription does not exist, 7226 (400) for parameters it cannot use, 7110 (500) for unexpected failures, and 7877 (400) for an unknown Web Billing checkout session. All of them reach the SDK as this error on iOS. See what RevenueDot's API errors mean.
FAQ
On iOS read rc_backend_error_code in the error's userInfo. On Android read the number after "Backend Code" in the underlying message. Then look it up in the server's error table.
Not by itself. It means the SDK has no specific name for the code the server sent. Check the status code: a 5xx points to a server problem, a 4xx to a bad request or a missing object.
In React Native, compare error.code with PURCHASES_ERROR_CODE.UNKNOWN_BACKEND_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.unknownBackendError.
Get started
RevenueDot answers the same SDK calls with the same error codes. Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue.
Already have an account? Sign in · Prefer your own servers? Self-host free