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.
ErrorCodeDescriptionHandlingVersion
ERR_UNKNOWN11000Unknownv2.1.2>SDK
ERR_UNINITIALIZED11001Uninitialized SDKSDK Stop
ERR_MIC_PERMISSION11002No mic permissionClient Handling
ERR_AUDIO11003Android Audio ErrorSDK Stop
ERR_INVALID_URL11004Invalid URL FormatSDK Stop
ERR_AUDIO_SILENCED11005Recording Audio SilencedSDK Handlingv2.2.0<=SDK
ERR_AUDIO_UNSILENCED11006Recording Audio UnsilencedSDK Handlingv2.2.0<=SDK
ERR_COMMON_UNAUTHORIZED11401UnauthorizedSDK Stop
ERR_COMMON_EXPIRED11403Plan is expired | Rate limit exceeded | Quota exceededSDK Stop
ERR_COMMON_NOT_FOUND11404user not existSDK Stop
ERR_NETWORK11500HTTP 500 error | Network errorSDK Stopv2.1.2>SDK
ERR_INIT_FAILED21000Failed to initAsleepConfig | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_INIT_SERVER_ERROR21500internal server errorClient Handlingv2.1.2<=SDK
ERR_CREATE_FAILED22000Failed to create a session | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_CREATE_CONFLICT22409The previous sleep session is not closed yet.SDK Stop
ERR_CREATE_SERVER_ERROR22500internal server errorSDK Stop
ERR_UPLOAD_FAILED23000Failed to upload | Network error occurred.SDK Handling
ERR_UPLOAD_UNAUTHORIZED23401invalid customer uuid | user_agent is emptySDK Handling
ERR_UPLOAD_FORBIDDEN23403The session is already closed.SDK Stop
ERR_UPLOAD_NOT_FOUND23404The session does not exist.SDK Stop
ERR_UPLOAD_BAD_REQUEST23400Invalid callback_url
or
audio format should be <sleep_session.sleep_sound_length> sec (16khz, 44.1khz, 48khz) (mp3, wav) under 10MB
or
cannot upload MELSPECTROGRAM file. only upload AUDIO file.
SDK Handling
ERR_UPLOAD_TOO_LARGE23413HTTP content length exceeded {size} bytes.SDK Handling
ERR_UPLOAD_UNPROCESSABLE23422Invalid parameter | Invalid seq_num (seq_num starts from 0)SDK Handling
ERR_UPLOAD_SERVER_ERROR23500internal server errorSDK Handling
ERR_CLOSE_FAILED24000Failed to close a session | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_CLOSE_UNAUTHORIZED24401Unauthorized | invalid customer uuidSDK Stop
ERR_CLOSE_FORBIDDEN24403The session is already closed.SDK Stop
ERR_CLOSE_BAD_REQUEST24400[WARNING] Invalid session end time. format(YYYY-MM-DDTHH:mm:ssz), must be less than session_start_timeSDK Stop
ERR_CLOSE_NOT_FOUND24404The session does not exist.SDK Stop
ERR_CLOSE_SERVER_ERROR24500internal server errorClient Handling
ERR_DELETE_FAILED25000Failed to delete a session | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_DELETE_UNAUTHORIZED25401Invalid customer uuidClient Handling
ERR_DELETE_SERVER_ERROR25500internal server errorClient Handlingv2.1.2<=SDK
ERR_DELETE_USER_FAILED26000Failed to delete a customer uuid | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_DELETE_USER_UNAUTHORIZED26401Invalid customer uuidClient Handling
ERR_DELETE_USER_SERVER_ERROR26500internal server errorClient Handlingv2.1.2<=SDK
ERR_ANALYSE_FAILED31000Failed to analyse | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_ANALYSE_UNAUTHORIZED31401UnauthorizedClient Handling
ERR_ANALYSE_NOT_FOUND31404Unable to find the sleep session of id {session_id}Client Handling
ERR_ANALYSE_SERVER_ERROR31500internal server errorClient Handlingv2.1.2<=SDK
ERR_REPORT_FAILED32000Failed to report | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_REPORT_UNAUTHORIZED32401UnauthorizedClient Handling
ERR_REPORT_NOT_FOUND32404Unable to find the sleep session of id {session_id}Client Handling
ERR_REPORT_SERVER_ERROR32500internal server errorClient Handlingv2.1.2<=SDK
ERR_REPORTS_FAILED33000Failed to reports | Network error occurred.Client Handlingv2.1.2<=SDK
ERR_REPORTS_UNAUTHORIZED33401The API key is not provided.Client Handling
ERR_REPORTS_SERVER_ERROR33500internal server errorClient Handlingv2.1.2<=SDK
ERR_AVERAGE_REPORT_FAILED34000Failed to average report | Network error occurred.Client Handlingv2.3.0<=SDK
ERR_AVERAGE_REPORT_BAD_REQUEST34400The period should be less than or equal to 100 daysClient Handlingv2.3.0<=SDK
ERR_AVERAGE_REPORT_NOT_FOUND34404Unable to find the user of id {user_id}Client Handlingv2.3.0<=SDK
ERR_AVERAGE_REPORT_SERVER_ERROR34500internal server errorClient Handlingv2.3.0<=SDK

Definition for SDK Error Handling

  • v2.1.2<=SDK

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

v2.2.0<=SDK

  • 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.

v2.1.2<=SDK

  • v2.1.2>SDK

The error codes that commonly occur when using the SDK are marked in red.
The strikethrough indicates error codes that are less likely to appear.
The blue error codes indicate the added error codes.