Stay organized with collections
Save and categorize content based on your preferences.
HealthConnectException
open class HealthConnectException : RuntimeException
Class representing health connect exceptions.
Summary
Constants |
static Int |
Data sync is in progress.
|
static Int |
An internal error occurred which the caller cannot address.
|
static Int |
The caller supplied invalid arguments to the call.
|
static Int |
An issue occurred reading or writing to storage.
|
static Int |
The caller exhausted the allotted rate limit.
|
static Int |
An IPC related error occurred.
|
static Int |
The caller doesn't have the correct permissions for this call.
|
static Int |
An unknown error occurred while processing the call.
|
static Int |
This operation is currently not supported by the platform.
|
Constants
ERROR_DATA_SYNC_IN_PROGRESS
static val ERROR_DATA_SYNC_IN_PROGRESS: Int
Data sync is in progress. Data read and writes are blocked.
Caller should try this api call again later.
Value: 8
ERROR_INTERNAL
static val ERROR_INTERNAL: Int
An internal error occurred which the caller cannot address.
This error may be considered similar to IllegalStateException
Value: 2
ERROR_INVALID_ARGUMENT
static val ERROR_INVALID_ARGUMENT: Int
The caller supplied invalid arguments to the call.
This error may be considered similar to IllegalArgumentException
.
Value: 3
ERROR_IO
static val ERROR_IO: Int
An issue occurred reading or writing to storage. The call might succeed if repeated.
This error may be considered similar to java.io.IOException
.
Value: 4
ERROR_RATE_LIMIT_EXCEEDED
static val ERROR_RATE_LIMIT_EXCEEDED: Int
The caller exhausted the allotted rate limit.
Value: 7
ERROR_REMOTE
static val ERROR_REMOTE: Int
An IPC related error occurred.
This error may be considered similar to android.os.RemoteException
.
Value: 6
ERROR_SECURITY
static val ERROR_SECURITY: Int
The caller doesn't have the correct permissions for this call.
This error may be considered similar to java.lang.SecurityException
.
Value: 5
ERROR_UNKNOWN
static val ERROR_UNKNOWN: Int
An unknown error occurred while processing the call.
Value: 1
ERROR_UNSUPPORTED_OPERATION
static val ERROR_UNSUPPORTED_OPERATION: Int
This operation is currently not supported by the platform.
Caller may try this api call again later.
Value: 9
Public methods
getErrorCode
open fun getErrorCode(): Int
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# HealthConnectException\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nHealthConnectException\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/HealthConnectException \"View this page in Java\") \n\n```\nopen class HealthConnectException : RuntimeException\n```\n\n|---|---|---|---|----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||\n| | ↳ | [java.lang.Exception](../../../java/lang/Exception.html#) |||\n| | | ↳ | [java.lang.RuntimeException](../../../java/lang/RuntimeException.html#) ||\n| | | | ↳ | [android.health.connect.HealthConnectException](#) |\n\nClass representing health connect exceptions.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_DATA_SYNC_IN_PROGRESS](#ERROR_DATA_SYNC_IN_PROGRESS:kotlin.Int) Data sync is in progress. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INTERNAL](#ERROR_INTERNAL:kotlin.Int) An internal error occurred which the caller cannot address. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INVALID_ARGUMENT](#ERROR_INVALID_ARGUMENT:kotlin.Int) The caller supplied invalid arguments to the call. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_IO](#ERROR_IO:kotlin.Int) An issue occurred reading or writing to storage. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_RATE_LIMIT_EXCEEDED](#ERROR_RATE_LIMIT_EXCEEDED:kotlin.Int) The caller exhausted the allotted rate limit. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_REMOTE](#ERROR_REMOTE:kotlin.Int) An IPC related error occurred. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_SECURITY](#ERROR_SECURITY:kotlin.Int) The caller doesn't have the correct permissions for this call. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_UNKNOWN](#ERROR_UNKNOWN:kotlin.Int) An unknown error occurred while processing the call. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_UNSUPPORTED_OPERATION](#ERROR_UNSUPPORTED_OPERATION:kotlin.Int) This operation is currently not supported by the platform. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------|--------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getErrorCode](#getErrorCode())`()` \u003cbr /\u003e |\n\nConstants\n---------\n\n### ERROR_DATA_SYNC_IN_PROGRESS\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_DATA_SYNC_IN_PROGRESS: Int\n```\n\nData sync is in progress. Data read and writes are blocked.\n\nCaller should try this api call again later. \n\n Value: 8\n\n### ERROR_INTERNAL\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INTERNAL: Int\n```\n\nAn internal error occurred which the caller cannot address.\n\nThis error may be considered similar to [IllegalStateException](../../../java/lang/IllegalStateException.html#) \n\n Value: 2\n\n### ERROR_INVALID_ARGUMENT\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_INVALID_ARGUMENT: Int\n```\n\nThe caller supplied invalid arguments to the call.\n\nThis error may be considered similar to [IllegalArgumentException](../../../java/lang/IllegalArgumentException.html#). \n\n Value: 3\n\n### ERROR_IO\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_IO: Int\n```\n\nAn issue occurred reading or writing to storage. The call might succeed if repeated.\n\nThis error may be considered similar to [java.io.IOException](../../../java/io/IOException.html#). \n\n Value: 4\n\n### ERROR_RATE_LIMIT_EXCEEDED\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_RATE_LIMIT_EXCEEDED: Int\n```\n\nThe caller exhausted the allotted rate limit. \n\n Value: 7\n\n### ERROR_REMOTE\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_REMOTE: Int\n```\n\nAn IPC related error occurred.\n\nThis error may be considered similar to [android.os.RemoteException](../../os/RemoteException.html#). \n\n Value: 6\n\n### ERROR_SECURITY\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_SECURITY: Int\n```\n\nThe caller doesn't have the correct permissions for this call.\n\nThis error may be considered similar to [java.lang.SecurityException](../../../java/lang/SecurityException.html#). \n\n Value: 5\n\n### ERROR_UNKNOWN\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_UNKNOWN: Int\n```\n\nAn unknown error occurred while processing the call. \n\n Value: 1\n\n### ERROR_UNSUPPORTED_OPERATION\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_UNSUPPORTED_OPERATION: Int\n```\n\nThis operation is currently not supported by the platform.\n\nCaller may try this api call again later. \n\n Value: 9\n\nPublic methods\n--------------\n\n### getErrorCode\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getErrorCode(): Int\n```"]]