better error handling for api.weather.gov

This commit is contained in:
Matt Walsh
2020-09-09 15:23:19 -05:00
parent 9a09ccd1ea
commit eb321005d9
12 changed files with 39 additions and 69 deletions

View File

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