Add log for when there is a non 404 or 200 code

This commit is contained in:
SileNce5k 2023-12-04 18:02:06 +01:00
parent ecc162549e
commit 563c43724b
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -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;