-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fix for logging error types instead of strings in the main try/catch #66
Conversation
The failure in |
@@ -374,7 +376,12 @@ export class IssueProcessor { | |||
event => event.event === 'labeled' && event.label.name === label | |||
); | |||
|
|||
return staleLabeledEvent!.created_at; | |||
if (!staleLabeledEvent) { |
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.
@hross FYI
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.
awesome. thanks for fixing my bad code :)
@@ -374,7 +376,12 @@ export class IssueProcessor { | |||
event => event.event === 'labeled' && event.label.name === label | |||
); | |||
|
|||
return staleLabeledEvent!.created_at; | |||
if (!staleLabeledEvent) { |
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.
awesome. thanks for fixing my bad code :)
When an
Error
type is thrown instead of astring
, the commandcore.error(error)
itself would fail, which would mask the real error. This generally results in an error that is described in actions/toolkit#398.This bug has been fixed in 1.2.4 of
@actions/core
, so let's just use that version.