mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 17:19:30 -07:00
better error handling for api.weather.gov
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user