fix exception handling on weather.py so it doesn't publicly send out my api token every time something bad happens
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 16s
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 16s
This commit is contained in:
@ -126,8 +126,8 @@ class WeatherAPI:
|
|||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return await response.json()
|
return await response.json()
|
||||||
except aiohttp.ClientError as e:
|
except aiohttp.ClientError as e:
|
||||||
logger.error(f"Error fetching weather data for '{location}': {e}")
|
logger.error(f"Error fetching weather data for '{location}'")
|
||||||
await ctx.send(f"`Error fetching weather data for '{location}': {e}`")
|
await ctx.send(f"`Error fetching weather data for '{location}'`")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def weather_embed(self, weather_data):
|
def weather_embed(self, weather_data):
|
||||||
|
Reference in New Issue
Block a user