mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-06-12 10:45:58 -05:00
Print body on error to aid in debugging #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chandlerc on GitHub (Apr 15, 2021).
It would be really nice to print out the body of the webhook when it fails.
Even better would be to print out a
curlcommand line to reproduce the failure, with any secrets un-substituted. Unclear if this is implementable though.That said, just redacting the URL and making printing out the body (and header) on failure an opt-in feature that folks who don't have secrets in their body or header can opt into would be awesome. Formatting it as a
curlcommandline (but with the user having to provide a URL) would still be really helpful.I know its possible to simulate this, but the best way I've found is pretty convoluted: add the body to the job's environment and add steps to print that environment prior to the webhook attempting to pass it as the body. It'd be much cleaner and nicer to have the webhook JS code do this error logging for us.
@chandlerc commented on GitHub (Apr 15, 2021):
:sigh:
It seems the github action UI already supports this and I just didn't realize it. Nevermind. Sorry for the noise.