diff --git a/src/Errors.h b/src/Errors.h index daa105001..2669e8a21 100644 --- a/src/Errors.h +++ b/src/Errors.h @@ -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 diff --git a/src/Http.c b/src/Http.c index e6a341938..e07363499 100644 --- a/src/Http.c +++ b/src/Http.c @@ -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); diff --git a/src/Logger.c b/src/Logger.c index 813951482..f649f9654 100644 --- a/src/Logger.c +++ b/src/Logger.c @@ -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; }