Skip to content

fix(browser-sdk): handle failed feedback form submissions - #799

Open
roncohen wants to merge 1 commit into
mainfrom
fix/feedback-submit-http-errors
Open

roncohen wants to merge 1 commit into
mainfrom
fix/feedback-submit-http-errors

Conversation

@roncohen

@roncohen roncohen commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Split the adjacent HTTP-error fix out of #798 so the callback-on-close feature stays focused. This PR is based directly on main.

  • Reject unsuccessful Send responses in manual and automated feedback forms instead of showing success and invoking onAfterSubmit with unsaved data.
  • Let the existing form error handler show the error and allow retry.
  • Add two focused submission-adapter regressions (500 response followed by a successful retry) and a patch changeset. No close-lifecycle or test-harness refactoring.

Verification

  • New regressions reproduced the bug before the fix.
  • Browser SDK unit tests: 210 passed.
  • Existing browser suite: 48 passed across Chromium, Firefox, and WebKit.
  • Browser/native source typechecks and build, lint, formatting, and diff checks: passed.

The declaration plugin emits the same previously verified baseline MSW HttpResponse test-type diagnostics; no new diagnostics were introduced.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the feedback-submission error-handling fix.

No open issues 🎉

What changed in this PR

This PR fixes failed Send handling in the browser SDK’s manual and automated feedback forms, keeping HTTP-error handling separate from the close-lifecycle work in #798.

Changes:

  • Reject unsuccessful submissions before invoking onAfterSubmit, allowing the existing form error handler to display an error and support retry.
  • Add regression tests for both feedback sources covering a 500 response followed by a successful retry.
  • Add a patch changeset for the browser SDK.
File Description
packages/​browser-sdk/​test/​feedbackSubmitErrors.test.ts Tests failed submissions and successful retries for both feedback sources.
packages/​browser-sdk/​src/​feedback/​feedback.ts Rejects automated submissions when no feedback ID is returned.
packages/​browser-sdk/​src/​client.ts Rejects manual submissions when the response is unsuccessful.
.changeset/​quiet-feedback-errors.md Documents the fix in a browser SDK patch changeset.

Review effort: Balanced

@roncohen
roncohen added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 7, 2026
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.

2 participants