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

Webhook retry mechanic bug #2140

Werseter opened this issue May 8, 2019 · 3 comments


Copy link

commented May 8, 2019


Currently, the mechanic allowing multiple attempts to send a webhook mechanic has a bug, that overwrites the request data with the response, rendering every attempt latter than the first one to send an incorrect request.

Reproduction Steps

For example, sending executing multiple webhooks executions in short succession, triggering ratelimiting asynchronous sleep period.

Expected Results

We are supposed to still send the same request we tried to send prior to retrying.

Actual Results

Server response is fed back. This can cause multitude of errors, i.e 'Cannot send an empty message' due to last response from 'X-Ratelimit-Remaining' being empty prior to continuing.


  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

  • version: latest commit 792b318 (running from source)
  • Python version: Python 3.6
  • Operating system: Windows 8.1

This comment has been minimized.

Copy link

commented May 11, 2019

I believe this is an issue with Discord rather one with the library.

Discord has done this from time to time before, whether with the library doing it or something like curl or requests alone.


This comment has been minimized.

Copy link

commented May 11, 2019

I didn't find time to make a PR from PC but the fix is a simple manner of renaming data to response inside the loop so the original data that we send through the webhook doesn't get overwritten when retrying.


This comment has been minimized.

Copy link

commented May 11, 2019

Oh I see what you're referring to. It got conflated with the curl-related issue I've seen before, e.g.

@Rapptz Rapptz added the bug label May 11, 2019

@Rapptz Rapptz added this to the v1.2 milestone May 11, 2019

@Rapptz Rapptz closed this in 8206982 May 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.