fix: include cause of parsing errors in action output logs#431
fix: include cause of parsing errors in action output logs#431zimeg merged 6 commits intoslackapi:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 7 7
Lines 703 709 +6
=======================================
+ Hits 702 708 +6
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
📝 Example of invalid YAML: 📝 Example of invalid JSON: 📝 Example of invalid attributes: |
zimeg
left a comment
There was a problem hiding this comment.
📣 A note on some strange patterns in these changes for the kind reviewers!
| /** @type {import('./errors.js').Cause} */ | ||
| const causes = /** @type {any} */ (error.cause); | ||
| if (causes?.values) { | ||
| for (const cause of causes.values) { | ||
| core.info(`${cause.stack}`); | ||
| } | ||
| } else { | ||
| core.info(`${error.stack}`); | ||
| } |
There was a problem hiding this comment.
🔗 The error cause values is valid data but typescript treats causes as "unknown" so this worksaround that.
mwbrooks
left a comment
There was a problem hiding this comment.
✅ LGTM! Huge improvement to the error messages. Hopefully this helps folks debug issues more easily!
| */ | ||
| try { | ||
| send(core); | ||
| await send(core); |
|
📝 Example of invalid YAML file: 📝 Example of invalid JSON file: 📝 Example of missing file: |
|
📝 Example of invalid arguments from a payload file too: |
|
@mwbrooks @hello-ashleyintech 🫡 With both unexpected After this merges, I will test a release candidate a few times for confidence. Then I look forward to a new release 🚀 |
Summary
This PR includes the cause of parsing errors in action output logs to fix #359.
Requirements