odin-bot-v2 icon indicating copy to clipboard operation
odin-bot-v2 copied to clipboard

Points: Gracefully handle API failures

Open Asartea opened this issue 8 months ago • 1 comments

Checks

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this issue follows the command name: brief description of request format, e.g. /help: add optional @user parameter

Do you want to be assigned to this issue?

  • [x] I would like to be assigned this issue to work on it

Description of the Feature Request

Currently running something related to points when developing crashes. For some reason, trying to assign points just silently fails, while trying any of the slash commands hardcrashes the app.

Pending resolution of #581 , we could at least catch the error and give a reply if it happens in development

Acceptance Criteria

  • [ ] The bot no longer crashes when running locally and doing anything related to points
  • [ ] Add a new ENV environment variable to config.js, and set it to development if running npm run dev
  • [ ] A nice message is returned, stating that the bot is unauthorized and that this is expected in development if the ENV variable is set to development, else return a nice message saying to contact the maintainers

Additional information

(open for alternate names for the variable)

Asartea avatar Mar 01 '25 14:03 Asartea