From d6c3848f67a4a367d53c2c936cf4854cd32d8c8f Mon Sep 17 00:00:00 2001 From: lightbulblighter <59720715+lightbulblighter@users.noreply.github.com> Date: Sat, 11 Jun 2022 03:40:48 -0700 Subject: [PATCH] log the response code from Roblox API --- PolygonDLL/Hooks/Http.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PolygonDLL/Hooks/Http.cpp b/PolygonDLL/Hooks/Http.cpp index 6c24e1f..042600a 100644 --- a/PolygonDLL/Hooks/Http.cpp +++ b/PolygonDLL/Hooks/Http.cpp @@ -113,11 +113,16 @@ void __fastcall Http__httpGetPostWinInet_hook(Http* _this, void*, bool isPost, i curl_easy_cleanup(curl); - if (result != CURLE_OK || response != 200) + if (result != CURLE_OK) { throw std::runtime_error("Unexpected error occurred when fetching Roblox API: 0x0"); } + if (response != 200) + { + throw std::runtime_error("Unexpected error occurred when fetching Roblox API: Response code was " + std::to_string(response)); + } + rapidjson::Document document; document.Parse(data.c_str());