Send message fails to retry on ratelimited error
Description
We had a send fail with:
Run slackapi/[email protected]
axios post failed, double check the payload being sent includes the keys Slack expects
{
username: 'github/repo',
channel: '#some-channel',
text: 'A message'
}
Error: {"retry_after":1,"ok":false,"error":"rate_limited"}
Error: Request failed with status code 429
It seems like this failure could be retries after a default timeout
What type of issue is this? (place an x in one of the [ ])
- [X] bug
- [ ] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [X] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [X] I've read and agree to the Code of Conduct.
- [X] I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version: 1.25.0
node version:
OS version(s):
Steps to reproduce:
- Have a message get a rate_limited error
Expected result:
The action would retry up to an upper limit of time
Actual result:
The action just fails
Attachments:
Run slackapi/[email protected]
axios post failed, double check the payload being sent includes the keys Slack expects
{
username: 'github/repo',
channel: '#some-channel',
text: 'A message'
}
Error: {"retry_after":1,"ok":false,"error":"rate_limited"}
Error: Request failed with status code 429
Hi @andre-qumulo thanks for writing in 💯
This seems to be a feature request for a retry option, we already have #245 open on the subject of retries
👋 Hello! We landed support for a retries option in @v2.0.0 that'll retry failed API requests that might succeed again, such as the 429 rate_limited error you're finding here.
Different options of available timing are included in the README, but an example step with retries and the latest update might resemble:
- name: Allow multiple attempts for sending
uses: slackapi/[email protected]
with:
retries: rapid
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
username: "github/repo"
channel: "#some-channel"
text: "A message"
This option applies to all other sending techniques too, and now that it's been released I think we can close this issue! Please feel free to follow up if you're finding this isn't working as you're expecting, but otherwise I hope rate limits can be mostly avoided with good timings 👻