Skip to content

fix(core): Don't crash on recoverable CLI command error #682

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

Merged
merged 7 commits into from
Mar 4, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Feb 21, 2025

This PR changes our error handling logic to no longer throw if:

  • Sentry CLI fails during release creation/updating/commits/deploys
  • Sentry CLI fails when uploading source maps

We still throw an error if

  • we detect plugin misconfiguration
  • we fail during source maps deletion. This is to avoid leaking source maps to production.

Worth noting that all of this is default behaviour. If users pass a custom errorHandler to their plugin config, they still have full control over throwing or swallowing the error.

closes #681

@Lms24 Lms24 self-assigned this Feb 21, 2025
@Lms24 Lms24 requested a review from lforst February 26, 2025 16:04
@Lms24 Lms24 marked this pull request as ready for review February 26, 2025 16:04
@Lms24 Lms24 merged commit 2fba173 into main Mar 4, 2025
18 checks passed
@Lms24 Lms24 deleted the lms/fix-core-dont-exit-on-cli-error branch March 4, 2025 14:53
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 5, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.0 | 3.2.2 |


## [v3.2.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#322)

-   feat(annotation): Handle JSX member expressions ([#690](getsentry/sentry-javascript-bundler-plugins#690))
-   fix(core): Don't crash on recoverable CLI command error ([#682](getsentry/sentry-javascript-bundler-plugins#682))
-   chore: Suggest putting `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT` in `passThroughEnv` when using Turborepo ([#675](getsentry/sentry-javascript-bundler-plugins#675))


## [v3.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#321)

-   deps: Bump [@sentry/cli](https://github.com/sentry/cli) to 2.42.2 ([#685](getsentry/sentry-javascript-bundler-plugins#685))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 8, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.0 | 3.2.2 |


## [v3.2.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#322)

-   feat(annotation): Handle JSX member expressions ([#690](getsentry/sentry-javascript-bundler-plugins#690))
-   fix(core): Don't crash on recoverable CLI command error ([#682](getsentry/sentry-javascript-bundler-plugins#682))
-   chore: Suggest putting `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT` in `passThroughEnv` when using Turborepo ([#675](getsentry/sentry-javascript-bundler-plugins#675))


## [v3.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#321)

-   deps: Bump [@sentry/cli](https://github.com/sentry/cli) to 2.42.2 ([#685](getsentry/sentry-javascript-bundler-plugins#685))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 9, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.0 | 3.2.2 |


## [v3.2.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#322)

-   feat(annotation): Handle JSX member expressions ([#690](getsentry/sentry-javascript-bundler-plugins#690))
-   fix(core): Don't crash on recoverable CLI command error ([#682](getsentry/sentry-javascript-bundler-plugins#682))
-   chore: Suggest putting `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT` in `passThroughEnv` when using Turborepo ([#675](getsentry/sentry-javascript-bundler-plugins#675))


## [v3.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#321)

-   deps: Bump [@sentry/cli](https://github.com/sentry/cli) to 2.42.2 ([#685](getsentry/sentry-javascript-bundler-plugins#685))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 11, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.0 | 3.2.2 |


## [v3.2.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#322)

-   feat(annotation): Handle JSX member expressions ([#690](getsentry/sentry-javascript-bundler-plugins#690))
-   fix(core): Don't crash on recoverable CLI command error ([#682](getsentry/sentry-javascript-bundler-plugins#682))
-   chore: Suggest putting `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT` in `passThroughEnv` when using Turborepo ([#675](getsentry/sentry-javascript-bundler-plugins#675))


## [v3.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#321)

-   deps: Bump [@sentry/cli](https://github.com/sentry/cli) to 2.42.2 ([#685](getsentry/sentry-javascript-bundler-plugins#685))
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.

Have Sentry fail gracefully during build phase
2 participants