-
Notifications
You must be signed in to change notification settings - Fork 24
feat: include errors from the sdk in outputs of erroring hooks #109
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 #109 +/- ##
==========================================
+ Coverage 63.47% 63.49% +0.02%
==========================================
Files 212 212
Lines 22331 22341 +10
==========================================
+ Hits 14174 14185 +11
+ Misses 7067 7065 -2
- Partials 1090 1091 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WilliamBergamin
left a comment
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.
Nice 💯
zimeg
left a comment
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 recent change after additional testing of erroneous cases for the wonderful reviewers more!
| // Include stderr outputs in error details if these aren't streamed | ||
| details := slackerror.ErrorDetails{} | ||
| if opts.Stderr == nil { | ||
| details = append(details, slackerror.ErrorDetail{Message: strings.TrimSpace(bufferr.String())}) | ||
| } |
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.
mwbrooks
left a comment
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.
✅ Great improvement to debugging errors in SDK hooks! 🎉 And I'm surprised at how small the change was to do it.
|
@WilliamBergamin @mwbrooks Thank y'all both for suggesting these changes and iterations needed for improved error handling with hooks - this is much more clear than parsing debug logs IMO and I hope makes finding fixes quick. I'll merge this now so we can test this in development! 👾 ✨ |


Summary
This PR includes the SDK hook script error in CLI error outputs to improve the debug experience, as @WilliamBergamin noted 🙏 ✨
Preview
Before changes
before.mov
After changes
after.mov
Reviewers
The following commands can be used to check these erroring outputs:
Notes
.slack/hooks.jsonis left for a followup PR, but these are shown in verbose outputs for now 🙏Requirements