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

[Feature Request] Add Exceptions to Tasks #73

Open
ppfeufer opened this issue Jan 15, 2023 · 4 comments
Open

[Feature Request] Add Exceptions to Tasks #73

ppfeufer opened this issue Jan 15, 2023 · 4 comments

Comments

@ppfeufer
Copy link
Contributor

Add exceptions with error messages to the API functions like send_channel_message_by_discord_id, send_direct_message_by_discord_id and send_direct_message_by_user_id so app devs can implement proper error handling when calling these tasks.

Thank you!

@ppfeufer
Copy link
Contributor Author

I meant exceptions we as dev can catch in our apps when using the discordbot-tasks.

For issues like this:

image

To allow us to do something like this:

try:
    aadiscordbot.tasks.send_channel_message_by_discord_id.delay(
        rss_feed.discord_channel.channel,
        discord_message,
        embed=False,
    )
except DiscordbotException as ex:
    logger.debug(f"Something went wrong. {ex.message}")

@pvyParts
Copy link
Collaborator

This can't be done with the current way we run tasks. The tasks you call in auth are simple shims. So the bot can manage it's rate limits 100% separately to auth.

@pvyParts
Copy link
Collaborator

I can, and will add more logging tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants