@sentry/junior-github 0.164.0 → 0.165.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2022,10 +2022,13 @@ function createGitHubGetPullRequestTool(ctx) {
2022
2022
  )
2023
2023
  });
2024
2024
  const parsed = await readJson2(response);
2025
- if (!response.ok)
2026
- throw new Error(
2027
- `GitHub pull request lookup failed with HTTP ${response.status}`
2028
- );
2025
+ if (!response.ok) {
2026
+ const message = `GitHub pull request lookup failed with HTTP ${response.status}`;
2027
+ if (response.status === 404) {
2028
+ throw new PluginToolInputError6(message);
2029
+ }
2030
+ throw new Error(message);
2031
+ }
2029
2032
  const providerResult = z5.object({
2030
2033
  base: z5.object({ ref: z5.string() }),
2031
2034
  draft: z5.boolean(),
@@ -2730,11 +2733,13 @@ function createGitHubResolvePullRequestReviewThreadTool(ctx, botEmail) {
2730
2733
  }).nullable()
2731
2734
  })
2732
2735
  }).parse(lookupPayload).data.node;
2733
- if (!thread) throw new Error("GitHub review thread was not found.");
2736
+ if (!thread) {
2737
+ throw new PluginToolInputError11("GitHub review thread was not found.");
2738
+ }
2734
2739
  const pullRequest = thread.pullRequest;
2735
2740
  const ownsPullRequest = pullRequest.repository.nameWithOwner.toLowerCase() === repo.ref.toLowerCase() && pullRequest.author.login.toLowerCase() === botLogin;
2736
2741
  if (!ownsPullRequest) {
2737
- throw new Error(
2742
+ throw new PluginToolInputError11(
2738
2743
  "Junior can only resolve review threads on pull requests it authored."
2739
2744
  );
2740
2745
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.164.0",
3
+ "version": "0.165.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,7 +31,7 @@
31
31
  "@sinclair/typebox": "^0.34.49",
32
32
  "drizzle-orm": "^0.45.2",
33
33
  "zod": "^4.4.3",
34
- "@sentry/junior-plugin-api": "0.164.0"
34
+ "@sentry/junior-plugin-api": "0.165.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^25.9.1",