Skip to content

Conversation

@nayounsang
Copy link
Contributor

close #446

For @octokit/request-err err, use err.status.
Add error handling for this issue.

@changeset-bot
Copy link

changeset-bot bot commented Apr 27, 2025

🦋 Changeset detected

Latest commit: 6cc2698

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Patch

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

@nayounsang
Copy link
Contributor Author

Wait, is it okay to "ignore" this error? It seems like it would be okay to just let it pop up.
So convert to draft.

@nayounsang nayounsang marked this pull request as draft April 27, 2025 15:11
err &&
typeof err === "object" &&
"code" in err &&
err.code !== "ENOENT"
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx for review & work!

@Andarist Andarist marked this pull request as ready for review May 11, 2025 09:14
@Andarist Andarist merged commit e9c36b6 into changesets:main May 11, 2025
@github-actions github-actions bot mentioned this pull request May 11, 2025
@nayounsang nayounsang deleted the fix-446-octokit-err branch May 11, 2025 09:40
valpinkman added a commit to LedgerHQ/changeset-action-ledger that referenced this pull request Aug 4, 2025
* 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)
  ...
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.

Deprecation: [@octokit/request-error] error.code is deprecated, use error.status.

2 participants