---
title: "What does networkError (code 10) mean in the purchases SDK?"
description: "networkError (code 10) means a request could not finish on the network: a timeout, a dropped connection or an unreachable host. It is temporary, so retry after a pause."
url: https://revenuedot.app/docs/errors/sdk-network-error
---

# What does networkError (code 10) mean in the purchases SDK?

The purchases SDK raises networkError (code 10) when a request fails at the network layer.

## Quick facts

| | |
|---|---|
| Error | `ErrorCode.networkError` (iOS), `PurchasesErrorCode.NetworkError` (Android), code 10 |
| Where | Purchases SDK (iOS, Android and the hybrid SDKs built on them) |
| What the vendor says | A network error has occurred. |

## Cause

- iOS: any `URLSession` failure other than "not connected to the Internet" (which becomes `offlineConnectionError`) maps here.
- Android: an `IOException` or `JSONException` while performing the request, and Play Billing `NETWORK_ERROR`.
- A wrong proxy URL: a typo, `http` instead of `https`, a missing port, or `localhost` on an Android emulator, where `localhost` is the emulator itself.

## Fix

1. Retry after a short wait and back off if it fails again.
2. Set the proxy URL before `configure`. On an Android emulator use `http://10.0.2.2:8787` for a server on your computer, or HTTPS.
3. On iOS, call `PurchasesDiagnostics.default.testSDKHealth()` to see whether the SDK can reach the server.
4. Read the underlying error: on iOS `NSUnderlyingErrorKey` holds the `URLError` with the real reason.

## Example

```swift
// The purchases SDK throws `ErrorCode` values; match the one you handle and let the rest fall through.
func handle(_ error: Error) {
    guard let code = error as? ErrorCode else {
        print("Not a purchases SDK error: \(error)")
        return
    }
    switch code {
    case .networkError:
        // Retrying is safe: the SDK keeps unposted purchases and sends them again later.
        print("Network problem; try again soon")
    default:
        print("Other purchases error: \(code.description)")
    }
}
```

*Compile-checked: `npm run check:snippets` type-checks this snippet with `swiftc` together with the `ErrorCode.swift` file of the RevenueDot `purchases-ios` fork (checked 2026-10-03).*

## How the RevenueDot SDK reports it

If RevenueDot is unreachable the SDK sees a connection error; if it answers 5xx the SDK keeps the transaction and retries. Deep dive: [revenuedot.app/errors/network-error](https://revenuedot.app/errors/network-error).

## Related

- [What does Play Billing NETWORK_ERROR (12) mean?](https://revenuedot.app/docs/errors/play-billing-network-error.md)
- [What does StoreKitError.networkError mean?](https://revenuedot.app/docs/errors/storekit-error-network-error.md)
- [What does offlineConnectionError (code 35) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-offline-connection-error.md)
- [What RevenueDot's API errors mean (server codes)](https://revenuedot.app/docs/api/errors.md)

## Source

- [RevenueDot purchases-ios: ErrorCode.swift (the iOS ErrorCode enum)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Generated/ErrorCode.swift)
- [RevenueDot purchases-android: PurchasesErrorCode.kt (the Android enum)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/generated/com/revenuecat/purchases/PurchasesErrorCode.kt)
- [RevenueDot purchases-android: common/errors.kt (backend code mapping)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/com/revenuecat/purchases/common/errors.kt)
- [RevenueDot purchases-android: google/errors.kt (Play Billing mapping)](https://github.com/revenuedot/purchases-android/blob/revenuedot/main-patches/purchases/src/main/kotlin/com/revenuecat/purchases/google/errors.kt)

Checked: 2026-10-03
