Reference
SDK errors
Stable error codes and retry guidance for infrastructure failures.
Error codes
| Error | Code | Retryable |
|---|---|---|
| DeviceNotFoundError | DEVICE_NOT_FOUND | No |
| DeviceInUseError | DEVICE_IN_USE | Yes |
| SessionNotFoundError | SESSION_NOT_FOUND | No |
| TimeoutError | TIMEOUT | Yes |
| ActionFailedError | ACTION_FAILED | Yes |
| UnsupportedCapabilityError | UNSUPPORTED_CAPABILITY | No |
| AbortedError | ABORTED | No |
Handle infrastructure errors
try {
const device = await ios.connect();
} catch (error) {
if (error instanceof PhoneUseError) {
console.error(error.code, error.retryable, error.message);
}
}