FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ensure loadApiError is caught by aeisenberg · Pull Request #882 · github/codeql-action · GitHub

Ensure loadApiError is caught - #882

Merged
aeisenberg merged 5 commits into
mainfrom
aeisenberg/better-error
Jan 24, 2022
Merged

aeisenberg merged 5 commits into
mainfrom
aeisenberg/better-error

Conversation

aeisenberg commented Jan 21, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

And add a better error message.

By using void instead of await, any error thrown is not caught
by surrounding try-catch blocks.

I could continue to use void and explicitly handle any thrown errors
by using .catch, but most likely the time savings is minimal and
this makes the code more complex.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

And add a better error message.

By using `void` instead of `await`, any error thrown is not caught
by surrounding try-catch blocks.

I could continue to use `void` and explicitly handle any thrown errors
by using `.catch`, but most likely the time savings is minimal and
this makes the code more complex.
aeisenberg requested a review from a team as a code owner January 21, 2022 18:04

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I was just looking at this too. Couple of suggestions.

Comment thread CHANGELOG.md Outdated
Comment thread src/feature-flags.ts Outdated
Comment thread src/feature-flags.ts Outdated
Comment thread src/init-action.ts Outdated
Discussion here #882 (comment)
shows that properly handling preloading feature flag errors is complex
and the benefit we get from it does not offset the complexity.

Copy link
Copy Markdown
Contributor

I haven't reviewed the code since Henry seems to have it covered (although happy to if you would like another set of eyes), but could I ask to hold off merging this until Tuesday since it seems like a potentially risky change to put into GHES 3.4 at the last minute?

Copy link
Copy Markdown
Contributor Author

Thanks for the reminder. I don't think this is a required fix for GHES 3.4. I will hold off on the merge.

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A couple of suggestions, otherwise LGTM to get in after the GHES 3.4 release.

Comment thread src/feature-flags.test.ts
Comment thread CHANGELOG.md Outdated

Copy link
Copy Markdown
Contributor

I've done the release that is going into GHES 3.4 so please do not consider this blocked on that anymore 👍🏼

aeisenberg enabled auto-merge January 24, 2022 16:56
aeisenberg disabled auto-merge January 24, 2022 17:06

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL