Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django API: HTTP error handling #127

Closed
pydis-bot opened this issue Nov 17, 2018 · 1 comment
Closed

Django API: HTTP error handling #127

pydis-bot opened this issue Nov 17, 2018 · 1 comment
Labels
a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) good first issue Good for newcomers

Comments

@pydis-bot
Copy link

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.

@pydis-bot pydis-bot added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) Cogs good first issue Good for newcomers labels Nov 17, 2018
@MarkKoz
Copy link
Member

MarkKoz commented Aug 6, 2019

Implemented in #392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants