Skip to content

fix(feedback)!: always reject sendFeedback with an Error - #20475

Merged
logaretm merged 1 commit into
developfrom
awad/js-126-feedback-error-rejections-breaking
Aug 27, 2026
Merged

fix(feedback)!: always reject sendFeedback with an Error#20475
logaretm merged 1 commit into
developfrom
awad/js-126-feedback-error-rejections-breaking

Conversation

@logaretm

Copy link
Copy Markdown
Member

sendFeedback currently rejects with an Error in some paths and a raw string in others. This normalizes all paths to reject with an Error, which is the expected shape and easier to handle for consumers.

Breaking: intended for the next major.

@linear-code

linear-code Bot commented Apr 24, 2026

Copy link
Copy Markdown

@logaretm logaretm changed the title feat(feedback)!: always reject sendFeedback with an Error fix(feedback)!: always reject sendFeedback with an Error Apr 24, 2026
@logaretm
logaretm changed the base branch from develop to awad/js-126-allow-error-messages-to-be-customized April 24, 2026 03:06
@logaretm logaretm added this to the 11.0.0 milestone Apr 24, 2026
@logaretm
logaretm force-pushed the awad/js-126-feedback-error-rejections-breaking branch from 29f92e6 to 90ef1af Compare April 24, 2026 03:14
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.57 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.58 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.6 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.51 kB - -
@sentry/browser (incl. Tracing, Replay) 88.06 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.76 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.45 kB -0.02% -18 B 🔽
@sentry/browser (incl. Feedback) 45.79 kB -0.04% -18 B 🔽
@sentry/browser (incl. sendFeedback) 33.35 kB -0.04% -11 B 🔽
@sentry/browser (incl. FeedbackAsync) 38.46 kB -0.01% -1 B 🔽
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.31 kB - -
@sentry/react (incl. Tracing) 50.79 kB - -
@sentry/vue 35.69 kB - -
@sentry/vue (incl. Tracing) 50.82 kB - -
@sentry/svelte 28.59 kB - -
CDN Bundle 30.36 kB - -
CDN Bundle (incl. Tracing) 49.07 kB - -
CDN Bundle (incl. Logs, Metrics) 32.56 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.95 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73 kB - -
CDN Bundle (incl. Tracing, Replay) 86.58 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.34 kB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.28 kB +0.01% +3 B 🔺
CDN Bundle - uncompressed 89.97 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.69 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.38 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.42 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.88 kB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.54 kB -0.01% -5 B 🔽
@sentry/nextjs (client) 53.33 kB - -
@sentry/sveltekit (client) 49.03 kB - -
@sentry/core/server 65.3 kB - -
@sentry/core/browser 52.35 kB - -
@sentry/node 122.72 kB +0.02% +21 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.22 kB - -
@sentry/node - without tracing 87.97 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.19 kB +0.03% +22 B 🔺
@sentry/cloudflare (withSentry) - minified 199.57 kB - -
@sentry/cloudflare (withSentry) 495.71 kB - -

View base workflow run

@logaretm
logaretm force-pushed the awad/js-126-feedback-error-rejections-breaking branch 3 times, most recently from 44d8d3c to fdc6ca4 Compare April 24, 2026 06:18
@logaretm
logaretm force-pushed the awad/js-126-allow-error-messages-to-be-customized branch 2 times, most recently from 90ec385 to 029c535 Compare April 24, 2026 13:19
Base automatically changed from awad/js-126-allow-error-messages-to-be-customized to develop April 24, 2026 13:44
@logaretm
logaretm force-pushed the awad/js-126-feedback-error-rejections-breaking branch 2 times, most recently from 6dfac86 to 7abb2f0 Compare August 25, 2026 17:49
@logaretm

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7abb2f0. Configure here.

Comment thread packages/feedback/test/core/sendFeedback.test.ts Outdated
@logaretm
logaretm force-pushed the awad/js-126-feedback-error-rejections-breaking branch 2 times, most recently from 31d6ad3 to 83c33f3 Compare August 25, 2026 18:09
@logaretm
logaretm marked this pull request as ready for review August 25, 2026 18:09
@logaretm
logaretm requested a review from a team as a code owner August 25, 2026 18:09
@logaretm
logaretm requested review from Lms24 and msonnb and removed request for a team August 25, 2026 18:09
Previously, sendFeedback's async rejection paths (timeout, 403, generic
transport error) rejected with a plain string, while the sync-throw paths
(empty message, no client) threw an Error. Unify on Error for all paths so
consumers can rely on a consistent rejection shape.

BREAKING CHANGE: sendFeedback now rejects with an Error instead of a string.
The message text is unchanged and is still customizable via the
`errorMessages` hint, so consumers reading it should switch from the
rejection value itself to `error.message`.
@logaretm
logaretm force-pushed the awad/js-126-feedback-error-rejections-breaking branch from 83c33f3 to f975f36 Compare August 26, 2026 20:12
@logaretm
logaretm merged commit 106d828 into develop Aug 27, 2026
232 of 234 checks passed
@logaretm
logaretm deleted the awad/js-126-feedback-error-rejections-breaking branch August 27, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants