Commit e090ccc
fix(gatsby): Fix errorHandler signature to match bundler-plugin-core API (#20048)
closes #20043
closes
[JS-2024](https://linear.app/getsentry/issue/JS-2024/sentrygatsby-build-can-fail-with-typeerror-invokeerr-is-not-a-function)
The `@sentry/bundler-plugin-core` was updated to call `errorHandler`
with only a single `Error` argument, but the Gatsby plugin's
`errorHandler` still expected two arguments `(err, invokeErr)`. This
caused builds to fail with "TypeError: invokeErr is not a function" when
a Sentry error occurred during source map upload.
It was originally added in #4064, where we still had v1 of the
`@senrty/webpack-plugin` (where the type still existed:
https://github.com/getsentry/sentry-webpack-plugin/blob/cb854281eb409c5c14f6a0d1042429240644a48d/index.d.ts#L112).
With v2, and the move to [our new
repo](https://github.com/getsentry/sentry-javascript-bundler-plugins),
this option got removed and is no longer part of it. So `invokeErr` is
safe to remove, and should have been already with this PR #11292
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent ad93ced commit e090ccc
2 files changed
+43
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
68 | 109 | | |
69 | 110 | | |
70 | 111 | | |
| |||
0 commit comments