From 563c43724b2a56987018c6195854b6e01c188432 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Mon, 4 Dec 2023 18:02:06 +0100 Subject: [PATCH] Add log for when there is a non 404 or 200 code --- util/getWeather.js | 1 + 1 file changed, 1 insertion(+) diff --git a/util/getWeather.js b/util/getWeather.js index 34208e1..cce7049 100644 --- a/util/getWeather.js +++ b/util/getWeather.js @@ -15,6 +15,7 @@ module.exports = async function (location) { return; }else if(res.statusCode != 200){ resolve(`Something went wrong while getting the weather for ${location}`); + console.log(`Got status code: ${res.statusCode} when trying to get weather for ${location}`); } else{ resolve(data); success = true;