-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Hello,
One of our jobs has this as the last step:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
channel: '#build-notifications'
if: always()In one build, this step failed with a following error:
Error: A request error occurred: read ECONNRESET
Error: Error: A request error occurred: read ECONNRESET
at Object.requestErrorWithOriginal (/home/runner/work/_actions/act10ns/slack/v1/dist/index.js:2694:33)
at IncomingWebhook.send (/home/runner/work/_actions/act10ns/slack/v1/dist/index.js:2584:32)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
As a result:
- Our deployment has actually finished okay
- This job failed
- We haven't received a notification about either of those
I do understand that this particular error is caused by the Slack API, but the outcome is so confusing that I decided to create this issue anyway. Looking at your code, there is no error handling around IncomingWebhook.send call. I don't know if that would help, but maybe you know a way to prevent this from happening.
The best thing which comes to my mind is some basic retry strategy, which is only triggered whenever network errors like this one occur (ignoring the normal Slack errors). Something like promise-retry may be helpful.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed