-
Notifications
You must be signed in to change notification settings - Fork 347
fix: use status when http err #461
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
🦋 Changeset detectedLatest commit: 6cc2698 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Wait, is it okay to "ignore" this error? It seems like it would be okay to just let it pop up. |
| err && | ||
| typeof err === "object" && | ||
| "code" in err && | ||
| err.code !== "ENOENT" |
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.
This has never meant to target RequestError but rather the errors potentially coming from fs.readFile. I think the proper fix would be only to wrap what we have to wrap with try/catch.
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.
Thx for review & work!
* upstream/main: (28 commits) Version Packages (changesets#480) Fixed missed `__dirname` reference (changesets#496) Switch to bundling with Rollup (changesets#495) Migrate to ESM (changesets#484) Fixed situations in which `cwd` was specified as a relative path and used with (default) `commitMode: git-cli` (changesets#486) Add LICENSE file (changesets#491) Fix PRs sometimes not getting reopened with `commitMode: github-api` (changesets#488) Removed `fs-extra` dependency (changesets#481) Setup Git user in `release-pr` workflow (changesets#493) Use proper ndoe version in `release-pr` workflow (changesets#492) Add `release-pr` workflow (changesets#490) Migrate to Vitest (changesets#483) Switch to `esbuild` for bundling (changesets#479) Import only for `semver/functions/lt` (changesets#482) Avoid hitting a deprecation warning when encountering errors from `@octokit/request-error` (changesets#461) Run typecheck on CI (changesets#478) Updated `@actions/*` and `@octokit/*` dependencies (changesets#477) Bump @babel/runtime from 7.21.5 to 7.27.1 (changesets#464) Version Packages (changesets#476) Make git add work consistently with subdirectories (changesets#473) ...
close #446
For @octokit/request-err err, use
err.status.Add error handling for this issue.