Add log for when there is a non 404 or 200 code
This commit is contained in:
parent
ecc162549e
commit
563c43724b
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue