Entle / action-pagerduty-alert

MIT License
8 stars 32 forks source link

Refactor error handling. #3

Closed mattcollier closed 1 week ago

mattcollier commented 3 years ago

The async sendAlert() function call on L46 does not work as intended with the try/catch block that surrounds it. I believe this inspired the additional try/catch block inside sendAlert itself.

https://github.com/Entle/action-pagerduty-alert/blob/main/index.js#L46

This PR is one possible remedy to this redundant code.

JohJonker commented 1 week ago

Thanks for the input. I've refactored the code quite a bit in the latest version to address this.