9. Download Error Codes
Notice
This document is a machine-translated draft and is currently undergoing review. Some content may be inaccurate or differ from the original Korean version. For the most precise information, refer to the Korean documentation.
SDK error codes
Core error code specifications and specific trigger points defined in the com.kollus.sdk.media.util.ErrorCodes class.
| Constant | Description | Trigger |
|---|---|---|
ERROR_OK | Completed successfully | — |
ERROR_INCORRECT_AUTH_KEY | SDK key expired/invalid | When calling initialize or the authentication method (setCertification) |
ERROR_UNSUPPORTED_DEVICE | Unsupported device | When registering device information (setDevice) or when DRM compatibility validation fails |
ERROR_STORAGE_FULL | Insufficient storage space | When starting metadata load (load) or file download (download) |
ERROR_WRITE_FILE | File write error | When a disk I/O error occurs during download |
ERROR_ALREADY_DOWNLOADING | Duplicate download request | When download(mck) is called for the same content |
ERROR_ALREADY_DOWNLOADED | Content already downloaded | When download(mck) is called for already downloaded content |
ERROR_NOT_EXIST_DOWNLOADED_CONTENTS | No locally downloaded file found | When calling getDownloadKollusContent(path) or during offline playback |
ERROR_EXPIRATION_DATE | Expiration date exceeded | When attempting offline playback |
ERROR_EXPIRATION_PLAY_TIME | Allowed playback time exceeded | When attempting offline playback |
ERROR_EXPIRATION_COUNT | Allowed playback count exceeded | When attempting offline playback |
ERROR_FORCE_DELETE | Content forcibly deleted via DRM callback kind2 or kind3 response | When DCB_INFO_DELETE signal is detected inside the onDRMInfo callback |
External SDK errors
Error handling patterns that may occur due to mobile operating system policies or network errors, outside of SDK internal logic.
- Storage permission denied: Configure
SecurityExceptionorIOExceptionexception handling at the app layer. Verify the permission declaration status in the manifest and the runtime permission acquisition flow. - Network connection failure: The SDK automatically retries. The automatic retry threshold can be adjusted with
storage.setNetworkTimeout(timeout, retryCount), and a setting ofsetNetworkTimeout(30, 3)(30 seconds, 3 retries) is recommended. - Background force termination: If a foreground service is not applied, the operating system may arbitrarily terminate the download process. The
FOREGROUND_SERVICE_TYPE_DATA_SYNCattribute must be used together. (See Also: 1. 다운로드 준비)
Recommended user messages by error code
| Error code | Example user message |
|---|---|
ERROR_INCORRECT_AUTH_KEY | "An issue occurred with app authentication. Please update the app to the latest version." |
ERROR_STORAGE_FULL | "Your device is running low on storage space. Please delete downloaded files you have finished watching or free up storage space." |
ERROR_WRITE_FILE | "Failed to save the file. Please try again later." |
ERROR_EXPIRATION_* | "The content viewing period has expired. Please connect to a network to renew the license." |
ERROR_UNSUPPORTED_DEVICE | "Content cannot be downloaded or played on this device." |