Flutter
SynheartWearError
PermissionDeniedError (a SynheartWearError with code PERMISSION_DENIED)
is thrown when the user denies the platform permission request.
DeviceUnavailableError (DEVICE_UNAVAILABLE) and NetworkError
(NETWORK_ERROR) are defined but not thrown by 0.7.0.
Cloud providers
WhoopProvider, GarminProvider, FitbitProvider and OuraProvider throw a
plain Exception with a descriptive message (for example when userId is
missing or the Synheart Wear API returns an error), and StateError for
misuse. Catch Exception around provider calls.
BLE heart-rate monitors
BleHrmProvider throws BleHrmError, whose code is a BleHrmErrorCode:
permissionDenied, bluetoothOff, deviceNotFound, subscribeFailed or
disconnected. Unknown native errors map to subscribeFailed. Errors on the
onHeartRate stream use the same type. See
BLE Heart Rate Monitor.
Garmin Health SDK (RTS)
GarminHealth throws GarminSDKError subclasses, each a SynheartWearError
with a GARMIN_* code: GarminInitializationError, GarminLicenseError,
GarminScanError, GarminPairingError, GarminConnectionError,
GarminStreamingError, GarminSyncError, GarminDataError and
GarminPlatformError.
Apple Health XML import
Failures throw the sealedAppleHealthXmlError: ZipReadFailed,
XmlNotFound, ParseFailed, IngestFailed or ImportCancelled.
Kotlin
SDK calls throwSynheartWearException(message, cause, code):
- any call before
initialize()(“SDK not initialized”); initialize()failures, wrapped;getProvider()when the vendor isn’t enabled orcloudConfigis missing;- every
GarminHealthdata call in the Maven Central build, which doesn’t include the licensed Garmin binary.
BleHrmException, whose errorCode is a BleHrmErrorCode
(PERMISSION_DENIED, BLUETOOTH_OFF, DEVICE_NOT_FOUND, SUBSCRIBE_FAILED,
DISCONNECTED).
Swift
SDK calls throwSynheartWearError:
The Apple Health XML import throws
AppleHealthXmlError: zipReadFailed,
xmlNotFound, parseFailed(line:column:message:), ingestFailed or
cancelled.
Retries
The SDKs don’t retry cloud requests or back off on rate limits; handle retries in your app. The only automatic retry is BLE reconnection after an unexpected disconnect (see BLE Heart Rate Monitor).Logging policy
The SDK logs atinfo/warn and never logs:
- Vendor OAuth tokens.
- Personal
device_ids in plain (debug builds may; production ones do not). - Raw HRV/RR sample bytes.
- XML payloads beyond malformed-record line numbers.
WearMetrics snapshots are not logged. Hosts that need observability should collect them at the consumer layer.
Related
- Wear Overview — config flags that influence error paths.
- Adapters — per-vendor flow.
- Data Schema — null-vs-missing semantics.