Django API: HTTP error handling #127
Labels
a: backend
Related to internal functionality and utilities (error_handler, logging, security, utils and core)
good first issue
Good for newcomers
Originally posted by Johannes Christ:
In order to generalize our current error handling, the new API client raises HTTP errors straight to the commands. For simple cases that don't require specialized handling, we should use the command error handler in
bot/cogs/events.py
in order to provide a useful response.I took an initial stab at it in https://gitlab.com/python-discord/projects/bot/merge_requests/67, which you can look at for reference, but I did not yet fully figure it out.
You will either have to fire requests against my API instance or set up your own instance of the website: see the setup documentation on the Django branch for details.
For documentation on the command handler, see https://discordpy.readthedocs.io/en/rewrite/ext/commands/api.html#discord.on_command_error.
If you have any questions, please ask.
Please leave a comment if you start to work on this issue.
Part of #67.
The text was updated successfully, but these errors were encountered: