Webclient: Change to 'website denied download or doesn't exist'

This commit is contained in:
UnknownShadow200 2020-12-15 07:49:51 +11:00
parent 8aeff27f5a
commit adb314458e
3 changed files with 6 additions and 2 deletions

View File

@ -52,6 +52,8 @@ enum ERRORS_ALL {
AL_ERR_INIT_DEVICE, AL_ERR_INIT_CONTEXT,
/* Inflate errors */
INF_ERR_BLOCKTYPE, INF_ERR_LEN_VERIFY, INF_ERR_REPEAT_BEG, INF_ERR_REPEAT_END,
INF_ERR_INVALID_CODE
INF_ERR_INVALID_CODE,
/* Misc other errors */
ERR_DOWNLOAD_INVALID
};
#endif

View File

@ -325,7 +325,7 @@ static void OnFinishedAsync(void* data, int len, int status) {
req->contentLength = len;
/* Usually because of denied by CORS */
if (!status) req->result = ERR_INVALID_ARGUMENT;
if (!status && !data) req->result = ERR_DOWNLOAD_INVALID;
if (req->data) Platform_Log1("HTTP returned data: %i bytes", &req->size);
Http_FinishRequest(req);

View File

@ -79,6 +79,8 @@ static const char* GetCCErrorDesc(cc_result res) {
case NBT_ERR_UNKNOWN: return "Unknown NBT tag type";
case CW_ERR_ROOT_TAG: return "Invalid root NBT tag";
case CW_ERR_STRING_LEN: return "NBT string too long";
case ERR_DOWNLOAD_INVALID: return "Website denied download or doesn't exist";
}
return NULL;
}