-
Notifications
You must be signed in to change notification settings - Fork 154
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
Action fails silently when the API call fails #63
Comments
Hi @kitchoi, thanks for taking the time to report this issue. At that timing, the Slack server-side had an incident: https://status.slack.com/2022-02-22 If this GitHub action does not result in failure in the scenario, the error handling should be improved in future versions. |
Thank you @seratch for your prompt response. In case this helps, I was able to reproduce a similar silent failure by deliberately supplying a channel ID that does not exist:
|
Thanks. Yes, I managed to reproduce the issue on my end. |
👋 With the - name: Send a message to nowhere
uses: slackapi/[email protected]
with:
errors: true
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ""
text: "Greetings!" This setup will cause the step to fail with the following error:
In addition to this, the - name: Attempt a burst of requests
uses: slackapi/[email protected]
with:
method: chat.postMessage
retries: RAPID
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "Greetings!" I'm hoping these options together might be useful when handling failed API calls 🙏 I'll close this issue for now, but please do feel free to comment with more questions or open another issue whenever! |
Description
There may have been a network issue which causes an API call to fail. However, the workflow did not fail.
The workflow was using Slack Bot Token and a Channel ID while posting a payload.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Reproducible in:
package version: 1.16.0
node version:
OS version(s): Ubuntu 20
Steps to reproduce:
slack-github-action/src/slack-send.js
Line 66 in 3658c41
It is worth noting that the said step runs fine many times, so I am pretty sure that the payload and parameters are set correctly.
Expected result:
The step causes the workflow to error
Actual result:
The workflow passes.
Attachments:
Error logged:
The text was updated successfully, but these errors were encountered: