Handle a client error according to where it occurred in the lifecycle. Exact error names and associated values differ by platform; use the SDK Reference as the source of truth.
Spatius API Keys must never be used for client recovery. In Direct Mode, the backend exchanges the API Key for a short-lived Session Token and returns only that token to the client.
Recovery flow
- Log the error, integration, SDK version, region, and current lifecycle phase.
- Retry only network and download failures that are likely to be transient.
- Refresh credentials for authentication failures instead of repeatedly reconnecting with the same token.
- Treat format, asset compatibility, and application configuration failures as developer errors.
- Stop automatic retries after a bounded number of attempts and surface a recoverable UI state.
For backend failures, see Server Error Handling.