# Error Codes # Asleep.AsleepErrorCode * `version>SDK`: Usable before a specific SDK version, `version<=SDK`: Usable from a specific SDK version or higher * SDK Error Codes for Audio Input by Android OS Version * For Android OS versions 9 and below: If more than one app using the audio input feature is running, only the first app launched will receive audio input correctly. Subsequent apps will encounter an internal error at the point of audio input setup, and the SDK will deliver an ‘ERR\_AUDIO’ error code. * For Android OS versions 10 and above: If more than one app using the audio input feature is running, the last app launched will receive audio input correctly. The previously launched apps will receive a ‘zero’ value in a ‘SILENCED’ state. The SDK will deliver an ‘ERR\_AUDIO\_SILENCED’ error code when it receives a ‘zero’ sound source. When it starts receiving the sound source correctly again, it will deliver an ‘ERR\_AUDIO\_UNSILENCED’ error code.
Error Code Description Handling Version
ERR\_SETUP\_INCOMPLETE 10000 Setup process is not completed. SDK Stop 3.1.0
ERR\_UNABLE\_ODA 10001 ODA is unavailable. SDK Stop 3.1.0
ERR\_UNKNOWN 11000 Unknown SDK Stop
ERR\_UNINITIALIZED 11001 Uninitialized SDK SDK Stop
ERR\_MIC\_PERMISSION 11002 No mic permission Client Handling
ERR\_AUDIO 11003 Android Audio Error SDK Stop
ERR\_INVALID\_URL 11004 Invalid URL Format SDK Stop
ERR\_AUDIO\_SILENCED 11005 Recording Audio Silenced SDK Handling
ERR\_AUDIO\_UNSILENCED 11006 Recording Audio Unsilenced SDK Handling
ERR\_COMMON\_UNAUTHORIZED 11401 Unauthorized SDK Stop
ERR\_COMMON\_EXPIRED 11403 Plan is expired | Rate limit exceeded | Quota exceeded SDK Stop
ERR\_COMMON\_NOT\_FOUND 11404 user not exist SDK Stop
ERR\_NETWORK 11500 HTTP 500 error | Network error SDK Stop
ERR\_INIT\_FAILED 21000 Failed to initAsleepConfig | Network error occurred. Client Handling
ERR\_INIT\_SERVER\_ERROR 21500 internal server error Client Handling
ERR\_CREATE\_FAILED 22000 Failed to create a session | Network error occurred. Client Handling
ERR\_CREATE\_CONFLICT 22409 The previous sleep session is not closed yet. SDK Stop
ERR\_CREATE\_SERVER\_ERROR 22500 internal server error SDK Stop
ERR\_UPLOAD\_FAILED 23000 Failed to upload | Network error occurred. SDK Handling
ERR\_UPLOAD\_UNAUTHORIZED 23401 invalid customer uuid | user\_agent is empty SDK Handling
ERR\_UPLOAD\_FORBIDDEN 23403 The session is already closed. SDK Stop
ERR\_UPLOAD\_NOT\_FOUND 23404 The session does not exist. SDK Stop
ERR\_UPLOAD\_BAD\_REQUEST 23400 Invalid callback\_url\ or\ audio format should be \ sec (16khz, 44.1khz, 48khz) (mp3, wav) under 10MB\ or\ cannot upload MELSPECTROGRAM file. only upload AUDIO file. SDK Handling
ERR\_UPLOAD\_TOO\_LARGE 23413 HTTP content length exceeded \{size} bytes. SDK Handling
ERR\_UPLOAD\_UNPROCESSABLE 23422 Invalid parameter | Invalid seq\_num (seq\_num starts from 0) SDK Handling
ERR\_UPLOAD\_SERVER\_ERROR 23500 internal server error SDK Handling
ERR\_CLOSE\_FAILED 24000 Failed to close a session | Network error occurred. Client Handling
ERR\_CLOSE\_UNAUTHORIZED 24401 Unauthorized | invalid customer uuid SDK Stop
ERR\_CLOSE\_FORBIDDEN 24403 The session is already closed. SDK Stop
ERR\_CLOSE\_BAD\_REQUEST 24400 \[WARNING] Invalid session end time. format(YYYY-MM-DDTHH:mm:ssz), must be less than session\_start\_time SDK Stop
ERR\_CLOSE\_NOT\_FOUND 24404 The session does not exist. SDK Stop
ERR\_CLOSE\_SERVER\_ERROR 24500 internal server error Client Handling
ERR\_DELETE\_FAILED 25000 Failed to delete a session | Network error occurred. Client Handling
ERR\_DELETE\_UNAUTHORIZED 25401 Invalid customer uuid Client Handling
ERR\_DELETE\_SERVER\_ERROR 25500 internal server error Client Handling
ERR\_DELETE\_USER\_FAILED 26000 Failed to delete a customer uuid | Network error occurred. Client Handling
ERR\_DELETE\_USER\_UNAUTHORIZED 26401 Invalid customer uuid Client Handling
ERR\_DELETE\_USER\_SERVER\_ERROR 26500 internal server error Client Handling
ERR\_ANALYSE\_FAILED 31000 Failed to analyse | Network error occurred. Client Handling
ERR\_ANALYSE\_UNAUTHORIZED 31401 Unauthorized Client Handling
ERR\_ANALYSE\_NOT\_FOUND 31404 Unable to find the sleep session of id \{session\_id} Client Handling
ERR\_ANALYSE\_SERVER\_ERROR 31500 internal server error Client Handling
ERR\_REPORT\_FAILED 32000 Failed to report | Network error occurred. Client Handling
ERR\_REPORT\_UNAUTHORIZED 32401 Unauthorized Client Handling
ERR\_REPORT\_NOT\_FOUND 32404 Unable to find the sleep session of id \{session\_id} Client Handling
ERR\_REPORT\_SERVER\_ERROR 32500 internal server error Client Handling
ERR\_REPORTS\_FAILED 33000 Failed to reports | Network error occurred. Client Handling
ERR\_REPORTS\_UNAUTHORIZED 33401 The API key is not provided. Client Handling
ERR\_REPORTS\_SERVER\_ERROR 33500 internal server error Client Handling
ERR\_AVERAGE\_REPORT\_FAILED 34000 Failed to average report | Network error occurred. Client Handling
ERR\_AVERAGE\_REPORT\_BAD\_REQUEST 34400 The period should be less than or equal to 100 days Client Handling
ERR\_AVERAGE\_REPORT\_NOT\_FOUND 34404 Unable to find the user of id \{user\_id} Client Handling
ERR\_AVERAGE\_REPORT\_SERVER\_ERROR 34500 internal server error Client Handling
# Definition for SDK Error Handling ## Definition of SDK Segment Operation * Init (initAsleepConfig) : SDK Initialization State * Tracking (SleepTrackingManager): Audio recording environment and server communication protocol management for sleep monitoring * Report (Reports): Request sleep monitoring results ## Error Case Definition * SDK Stop: Termination process within the SDK. The SDK needs to be restarted for a new start because it is terminated internally. Depending on the status of the SDK, the session and audio recording function are terminated by itself. You need to start from the "initAsleepConfig" request to activate the SDK * SDK Handling: The SDK updates the error internally and performs the next action. If you want to terminate after receiving an error, you need to handle it depending on the state of the SDK call. To terminate the SDK, you need to call stopTracking only in the Tracking state, and no separate processing is required in other sections * Client Handling: An error that needs to be handled by the client. Used for error checking during development. * Do not used: Error not in use in the current version. ## Error Handling Classification * Indicate commonly occurring Error Codes in red. Error codes that are unlikely to appear should be struck through. ![](https://files.readme.io/844458c-image.png) * Added Error Code for Audio * ERR\_AUDIO(11003): If the audio recording does not function properly due to an internal error at the setup stage, the ‘ERR\_AUDIO’ error code is delivered. * ERR\_AUDIO\_SILENCED(11005): If the sound source being measured during audio recording is read as a ‘zero’ value, the ‘ERR\_AUDIO\_SILENCED’ error code is delivered. * ERR\_AUDIO\_UNSILENCED(11006): If the sound source being measured during audio recording recovers normally after the ‘ERR\_AUDIO\_SILENCED’ error code has been raised, the ‘ERR\_AUDIO\_UNSILENCED’ error code is delivered.