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

fix(action): fix unhandled promise rejection by benatshippabo · Pull Request #32 · githubocto/repo-visualizer · GitHub

This repository was archived by the owner on Aug 6, 2026. It is now read-only.
/ repo-visualizer Public archive

fix(action): fix unhandled promise rejection - #32

Merged
Wattenberger merged 1 commit into
githubocto:mainfrom
benatshippabo:fix/unhandled-promise-rejection
Aug 18, 2021
Merged

fix(action): fix unhandled promise rejection#32
Wattenberger merged 1 commit into
githubocto:mainfrom
benatshippabo:fix/unhandled-promise-rejection

Conversation

benatshippabo commented Aug 18, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Summary

This fixes the unhandled promise rejection when something errors out inside main. An example would be when one of the git commands fail such as pushing to a write protected branch, you would see this message but the action still passes:

(node:1625) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1625) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It is fixed by using core.setFailed documented here.

Related issues: #2 #9

Copy link
Copy Markdown
Contributor

this is great, thanks for the PR!

Wattenberger merged commit eb6863e into githubocto:main Aug 18, 2021
ageorgou added a commit to ageorgou/repo-visualizer that referenced this pull request Aug 22, 2021
Wattenberger pushed a commit that referenced this pull request Aug 23, 2021
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL