Skip to content

Error Codes

Liam Ramirez-Guess edited this page Oct 17, 2024 · 7 revisions

On occasion, errors may pop up when using the weatherbot. Here is a full list of possible errors, their rarity, and an explanation!

There are 4 types of errors, Command Errors, External errors, Database Errors, and finally Usage Errors. They are gone through detail in each section!

Command Errors

These Errors are uncommon errors that may occur when attempting to use a command. They usually occur when the OpenWeathermapAPI response does not return a successful (200) header, and therefore is probably not a problem with the bot and likely not caused by the user. If any of these errors occur please join the discord and create a bug report.

MOST OF THESE ERRORS ARE CAUSED BY SETTING AN INVALID LOCATION. PLEASE ENTER A VALID LOCATION AND CHECK FOR TYPOS!

- 101 Static Badge

Error Fetching the weather using /weather This error can occur when the API response is not 200 and therefore the bot cannot provide the weather for that location.

- 102 Static Badge

Error fetching the 5 day 3 hour forecast using /forecast This error can occur when the API response is not 200 and therefore the bot cannot provide the 5 day 3 hour forecast for that location.

- 103 Static Badge

Error fetching the 16 day forecast using /16dayforecast This error can occur when the API response is not 200 and therefore the bot cannot provide the 16 day forecast for that location.

- 104 Static Badge

Error fetching the air quality using /airquality This error can occur when the API response is not 200 and therefore the bot cannot provide the air quality for that location. Keep in mind this command uses a different API URL and is usually isolated from the other commands

- 105 Static Badge

Error fetching any wind information using /wind This error can occur when the API response is not 200 and therefore the bot cannot provide the wind information for that location.

- 106 Static Badge

Error fetching humidity information using /humidity This error can occur when the API response is not 200 and therefore the bot cannot provide the humidity information for that location.

- 107 Static Badge

Error fetching sun times information using /suntimes This error can occur when the API response is not 200 and therefore the bot cannot provide the sunrise/sunset times for that location.

- 108 Static Badge

Error fetching weather alerts using /alerts This error can occur when the API response is not 200 and therefore the bot cannot provide weather alerts for that location.

- 109 Static Badge

Error fetching weather information during a daily updates cycle This error can occur when the API response is not 200 and therefore the bot cannot provide the weather for the user's default location during the daily updates trigger.

- 110 Static Badge

Error fetching weather information for the /weatherblob command This error can occur when the API response is not 200 and therefore the bot cannot provide the needed weather info for that location.

- 111 Static Badge

Error fetching 30 day forecast for the /30dayforecast command This error can occur when the API response is not 200 and therefore the bot cannot provide the 30 day forecast for that location.

- 112 Static Badge

Error fetching geocoding information when using /geocode This error can occur when the API response is not 200 and therefore the bot cannot provide geocoding information for that location.

- 113 Static Badge

Error fetching hourly forecast for the /hourlyforecast command This error can occur when the API response is not 200 and therefore the bot cannot provide the hourly forecast for that location.

External Errors

These errors are caused by the parameters the user has passed into the command arguments. If you get one of these errors, re-check what you have typed and make sure it works with the command!

- 201 Static Badge

No accessible location This is the most common of all errors, it means that the user has not provided a location argument when using that command and that they have no default command set.

Fix -- Set a default location with /setlocation or pass a location into the optional parameter when running the command

- 202 Static Badge

Geocoding Input Error This is usually caused when the location passed in the command, or default location is not a recognized place. Ex: Calgary is a place but fasjkdfhjshdfkh is not.

Fix -- Use a valid location!

- 203 Static Badge

Invalid time format This is caused when an invalid time format is passed into the /dailyupdates [Time][AM/PM][Timezone] command.

Fix -- Set a time in the Time field using HH:MM format and choose AM or PM. Ex: /dailyupdates 8:05 am UTC

- 204 Static Badge

Invalid Timezone This is caused when an invalid timezone is passed into the /dailyupdates [Time][AM/PM][Timezone] command.

Fix* -- Set a recognized timezone when using the command. Please select one from the list provided when using the command to ensure it works. Ex: /dailyupdates 8:05 am UTC

- 205 Static Badge

Invalid Unit This can be triggered when an invalid unit is passed into the setunit [Unit] command.

Fix -- Enter C or F when using the command! Ex: /setunit C

- 206 Static Badge

Invalid format This is caused when an invalid format is passed into the format [format] command.

Fix -- Enter embed or plan when running the command. Ex: /format embed

Database errors

All but one of these errors are almost impossible to trigger, caused by errors in the data storage system.

- 301 Static Badge

No Daily Updates exist

This is caused when you run disableupdates without having set a daily update in the first place

- 302 Static Badge

JSON file not found

This is an almost impossible error, signifying that the Database does not exist. This error is usually thrown when I am maintaining the bot, but should never occur.

- 303 Static Badge

Error Decoding JSON

This is an almost impossible error, signifying that the bot cannot read the info in the database. This error is usually thrown when I am maintaining the bot, but should never occur.

User related Errors

These errors are caused when the bot cannot communicate with a user or vice-versa. There is usually nothing we can do about these errors, as they are discord-related and not caused by the bot.

- 401 Static Badge

Bot lacks DM Permissions

This error is caused when the bot cannot send the user a Direct Message when trying to daily-update. This may be because the bot was not set up properly, or because the user has certain DM perms turned off.

- 403 Static Badge

Forbidden The user is not allowed to run a certain command. This can be caused when trying to run the updatebot command, where we only want bot developers to update the bot's database.

- 404 Static Badge

User not found This error is caused when a certain user cannot be found when trying to send a daily update to their DM's. There is nothing we can do about this, and can be caused by deleted users, etc.

Please check the above resources to find info about the Weatherbot!

Clone this wiki locally