diff --git a/src/discord/DiscordInstance.cpp b/src/discord/DiscordInstance.cpp index a5e6567..15edfba 100644 --- a/src/discord/DiscordInstance.cpp +++ b/src/discord/DiscordInstance.cpp @@ -510,7 +510,10 @@ void DiscordInstance::HandleRequest(void* pRequestPtr) case HTTP_NOTFOUND: case HTTP_BADGATEWAY: + case HTTP_UNSUPPMEDIA: { + DbgPrintF("Resource %s not loaded due to error %d", pRequest->url, pRequest->result); + if (pRequest->itype == IMAGE || pRequest->itype == IMAGE_ATTACHMENT) { GetFrontend()->OnAttachmentFailed(pRequest->itype == IMAGE, pRequest->additional_data); return; @@ -526,6 +529,9 @@ void DiscordInstance::HandleRequest(void* pRequestPtr) case HTTP_BADGATEWAY: suffix = " could not be accessed due to a bad gateway. (502)"; break; + case HTTP_UNSUPPMEDIA: + suffix = " could not be accessed due to an unsupported media type. (415)"; + break; } str = "The following resource " + pRequest->url + suffix; diff --git a/src/discord/HTTPClient.hpp b/src/discord/HTTPClient.hpp index 19b1a62..c994321 100644 --- a/src/discord/HTTPClient.hpp +++ b/src/discord/HTTPClient.hpp @@ -19,6 +19,7 @@ enum eHttpResponseCodes HTTP_UNAUTHORIZED = 401, HTTP_FORBIDDEN = 403, HTTP_NOTFOUND = 404, + HTTP_UNSUPPMEDIA = 415, HTTP_TOOMANYREQS = 429, HTTP_BADGATEWAY = 502,