odin-bot-v2
odin-bot-v2 copied to clipboard
Points: Gracefully handle API failures
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 requestformat, 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 runningnpm 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)