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;
|
return;
|
||||||
}else if(res.statusCode != 200){
|
}else if(res.statusCode != 200){
|
||||||
resolve(`Something went wrong while getting the weather for ${location}`);
|
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{
|
} else{
|
||||||
resolve(data);
|
resolve(data);
|
||||||
success = true;
|
success = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue