These docs are for v1.0. Click to read the latest docs for v2.0.

Error Codes

Asleep.AsleepErrorCode

ErrorCodeDescription
ERR_UNKNOWN11000Unknown
ERR_UNINITIALIZED11001Uninitialized SDK
ERR_MIC_PERMISSION11002No mic permission
ERR_AUDIO11003Android Audio Error
ERR_INVALID_URL11004Invalid URL Format
ERR_COMMON_UNAUTHORIZED11401Unauthorized
ERR_COMMON_EXPIRED11403Plan is expired | Rate limit exceeded | Quota exceeded
ERR_COMMON_NOT_FOUND11404user not exist
ERR_NETWORK11500HTTP 500 error | Network error
ERR_CREATE_UNAUTHORIZED22401Unauthorized | user_agent is empty
ERR_CREATE_CONFLICT22409The previous sleep session is not closed yet.
ERR_CREATE_VALIDATION22422Invalid session_start_time (YYYY-MM-DDTHH:mm:ssz), Invalid parameter
ERR_CREATE_FAILED22500Failed to create a session
ERR_UPLOAD_UNAUTHORIZED23401invalid customer uuid | user_agent is empty
ERR_UPLOAD_FORBIDDEN23403The session is already closed.
ERR_UPLOAD_NOT_FOUND23404The session does not exist.
ERR_UPLOAD_BAD_REQUEST23400Invalid callback_url | audio format should be <sleep_session.sleep_sound_length> sec (16khz, 44.1khz, 48khz) (mp3, wav) under 10MB | cannot upload MELSPECTROGRAM file. only upload AUDIO file.
ERR_UPLOAD_TOO_LARGE23413HTTP content length exceeded {size} bytes.
ERR_UPLOAD_UNPROCESSABLE23422Invalid parameter | Invalid seq_num (seq_num starts from 0)
ERR_CLOSE_UNAUTHORIZED24401Unauthorized | invalid customer uuid
ERR_CLOSE_FORBIDDEN24403The session is already closed.
ERR_CLOSE_BAD_REQUEST24400[WARNING] Invalid session end time. format(YYYY-MM-DDTHH:mm:ssz), must be less than session_start_time
ERR_CLOSE_NOT_FOUND24404The session does not exist.
ERR_CLOSE_FAILED24500Failed to close a session
ERR_DELETE_UNAUTHORIZED25401Invalid customer uuid
ERR_DELETE_USER_UNAUTHORIZED26401Invalid customer uuid
ERR_ANALYSE_BAD_REQUEST31400The invalid timezone is provided.
ERR_ANALYSE_NOT_FOUND31404Unable to find the sleep session of id {session_id}
ERR_ANALYSE_UNPROCESSABLE31422The format of the sleep session id is not valid.
ERR_REPORT_BAD_REQUEST32400The invalid timezone is provided.
ERR_REPORT_NOT_FOUND32404Unable to find the sleep session of id {session_id}
ERR_REPORT_UNPROCESSABLE32422The format of the sleep session id is not valid.
ERR_REPORTS_BAD_REQUEST33400The invalid timezone is provided.
ERR_REPORTS_UNAUTHORIZED33401The API key is not provided.