Skip to main content
The RunAnywhere SDK uses a unified error system that provides detailed information for debugging and user-friendly messages for display.

SDKError

All SDK errors are represented by SDKError:

Error Codes

Error Categories

Basic Error Handling

Handling Specific Errors

By Error Code

By Category

Error Factory Methods

The SDK provides factory methods for creating errors:

SwiftUI Error Handling

Error Recovery Strategies

Retry Logic

Graceful Degradation

Model Fallback

Logging Errors

Event-Based Error Handling

Subscribe to error events SDK-wide:

Best Practices

Catch SDKError specifically to access detailed error information.
Use recoverySuggestion when available, or map error codes to friendly messages.
Log full error details including stack traces in development builds.
Where possible, implement automatic recovery (retries, fallbacks).

Configuration

SDK configuration →

Best Practices

Performance tips →