action-slack-incoming-webhook
action-slack-incoming-webhook copied to clipboard
feat: improve error handling and logging
Small PR to print the slack response body in case of an error which can be useful for debugging. See the list of errors here: https://api.slack.com/messaging/webhooks#handling_errors
I used the example from the node-fetch
lib for the implementation:
https://github.com/node-fetch/node-fetch?tab=readme-ov-file#handling-client-and-server-errors
Here's what it looks like when you have an error