better error handling for api.weather.gov
This commit is contained in:
parent
9a09ccd1ea
commit
eb321005d9
12 changed files with 39 additions and 69 deletions
|
|
@ -55,6 +55,7 @@ const icons = (() => {
|
|||
return addPath('Cloudy.gif');
|
||||
|
||||
case 'fog':
|
||||
case 'fog-n':
|
||||
return addPath('Fog.gif');
|
||||
|
||||
case 'rain_sleet':
|
||||
|
|
@ -124,7 +125,7 @@ const icons = (() => {
|
|||
return addPath('Blowing Snow.gif');
|
||||
|
||||
default:
|
||||
console.log(`Unable to locate regional icon for ${link} ${isNightTime}`);
|
||||
console.log(`Unable to locate regional icon for ${conditionName} ${link} ${isNightTime}`);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
@ -245,7 +246,7 @@ const icons = (() => {
|
|||
return addPath('Blowing-Snow.gif');
|
||||
|
||||
default:
|
||||
console.log(`Unable to locate icon for ${link} ${isNightTime}`);
|
||||
console.log(`Unable to locate icon for ${conditionName} ${link} ${isNightTime}`);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue