-
Notifications
You must be signed in to change notification settings - Fork 169
fix: include cause of parsing errors in action output logs #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📣 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔗 The error cause values
is valid data but typescript
treats causes
as "unknown" so this worksaround that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM! Huge improvement to the error messages. Hopefully this helps folks debug issues more easily!
@@ -6,13 +6,21 @@ import send from "./send.js"; | |||
* from the send.js file for testing purposes. | |||
*/ | |||
try { | |||
send(core); | |||
await send(core); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
📝 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