Browse documentation

Reference

SDK errors

Stable error codes and retry guidance for infrastructure failures.

Error codes

ErrorCodeRetryable
DeviceNotFoundErrorDEVICE_NOT_FOUNDNo
DeviceInUseErrorDEVICE_IN_USEYes
SessionNotFoundErrorSESSION_NOT_FOUNDNo
TimeoutErrorTIMEOUTYes
ActionFailedErrorACTION_FAILEDYes
UnsupportedCapabilityErrorUNSUPPORTED_CAPABILITYNo
AbortedErrorABORTEDNo

Handle infrastructure errors

tsphone-use
try {
  const device = await ios.connect();
} catch (error) {
  if (error instanceof PhoneUseError) {
    console.error(error.code, error.retryable, error.message);
  }
}