docs

SDK error catalog

Every PasspointErrorCode value, what fires it, and how to recover.

Every SDK method that touches the OS or the network throws a PasspointError with a typed code. Switch on e.code, not e.message. Messages are unstable.

import { PasspointError, PasspointErrorCode } from '@helium/passpoint-sdk';

try {
  await install(subscriberId);
} catch (e) {
  if (e instanceof PasspointError) {
    switch (e.code) {
      case PasspointErrorCode.PERMISSION_DENIED:
        // prompt for ACCESS_FINE_LOCATION
        break;
      case PasspointErrorCode.PROFILE_INSTALL_CANCELLED:
        // user dismissed the iOS dialog
        break;
      case PasspointErrorCode.API_UNAUTHORIZED:
        // bad key, surface to ops
        break;
      case PasspointErrorCode.NETWORK_ERROR:
        // no connectivity, retry later
        break;
    }
  }
}

Error codes

CodePlatformDescriptionRecovery
NOT_CONFIGUREDBothSDK not initialized.Wrap your app in <PasspointProvider>.
INVALID_CONFIGBothBad config, for example an empty apiKey.Fix the config; check env vars are loaded.
PLATFORM_NOT_SUPPORTEDBothRunning on web or an unsupported platform.Gate your UI on Platform.OS.
SIMULATOR_NOT_SUPPORTEDiOSPasspoint requires a physical device.Test on hardware.
PERMISSION_DENIEDAndroidACCESS_FINE_LOCATION not granted.Request the permission, prompt the user, retry.
MISSING_ENTITLEMENTSiOSHotspot Configuration capability missing.Add the entitlement in Xcode; rebuild.
KEYPAIR_GENERATION_FAILEDBothRSA keypair generation failed.Surface to support; usually device-specific.
CSR_GENERATION_FAILEDBothCertificate signing request build failed.Surface to support.
NETWORK_ERRORBothCan't reach the Wi-Fi offload API.Retry with backoff.
API_ERRORBothAPI returned a non-2xx not covered below.Inspect nativeError; surface to support.
API_UNAUTHORIZEDBothAPI key rejected (401 / 403).Don't retry. Re-issue or rotate the key.
API_RATE_LIMITEDBothToo many requests (429).Back off exponentially, honoring Retry-After.
CERTIFICATE_PARSE_FAILEDBothCouldn't parse the certificate in the API response.Surface to support; likely a server-side bug.
CERTIFICATE_SAVE_FAILEDBothKeychain / KeyStore save failed.Check entitlements (iOS) and KeyStore state (Android).
CERTIFICATE_NOT_FOUNDBothNo certificate installed, during remove.Treat as a no-op; UI should show "not installed".
IDENTITY_LOAD_FAILEDiOSCouldn't build a TLS identity from certificate and key.Surface to support; usually a keychain group misconfiguration.
PROFILE_INSTALL_FAILEDBothThe OS rejected the Passpoint profile.Inspect nativeError; check entitlements and minSdk.
PROFILE_INSTALL_CANCELLEDiOSUser dismissed the OS install dialog.Prompt the user to retry.
PROFILE_NOT_FOUNDBothNo profile to remove.Treat as success.
PROFILE_REMOVE_FAILEDBothFailed to remove the profile.Retry; if persistent, surface to support.
REMOVE_FAILEDBothFailed to remove certificate and profile together.Retry; surface to support if persistent.
WIFI_MANAGER_UNAVAILABLEAndroidWifiManager service unavailable.Surface to support; device or OEM issue.
NETWORK_SUGGESTION_DISALLOWEDAndroidUser blocked the app from adding Wi-Fi networks.Send the user to system settings to allow suggestions.
NETWORK_SUGGESTION_LIMITAndroidExceeded the maximum network suggestions per app.Remove old suggestions, retry.
UNKNOWNBothUnexpected error.Inspect nativeError; surface to support.

Inspecting nativeError

For codes that wrap an OS-level error, e.nativeError (a string) holds the underlying message. Log it, but don't pattern-match on it. The text isn't stable across OS versions.

Next

Troubleshooting