Skip to content

fix(android): Handle feedback configurator failures - #6239

Merged
adinauer merged 6 commits into
fix/callback-error-handlingfrom
fix/callback-error-handling-user-feedback
Oct 13, 2026
Merged

adinauer merged 6 commits into
fix/callback-error-handlingfrom
fix/callback-error-handling-user-feedback

Conversation

@adinauer

@adinauer adinauer commented Oct 9, 2026

Copy link
Copy Markdown
Member

📜 Description

Handle exceptions from Android feedback OptionsConfiguration and OptionsConfigurator callbacks without preventing the feedback form from opening. Each callback receives a copy of the current options, and its mutations are committed only when it completes successfully.

💡 Motivation and Context

A customer callback could currently crash feedback form construction. It could also leave partially applied option changes before throwing. Falling back to the last valid options keeps the form available and avoids exposing partially configured state.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew :sentry-android-core:testReleaseUnitTest --tests io.sentry.android.core.SentryUserFeedbackFormTest

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

adinauer and others added 2 commits October 9, 2026 06:25
Keep the feedback form usable when an options configuration callback throws. Apply callback changes transactionally so partially mutated feedback options are discarded.

Co-Authored-By: Claude <noreply@anthropic.com>
@sentry

sentry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.59.0 (1) release

⚙️ sentry-android Build Distribution Settings

adinauer and others added 3 commits October 13, 2026 09:42
Ensure a failed legacy configuration does not prevent the configurator
from receiving the original feedback options and applying its changes.

Co-Authored-By: Claude <noreply@anthropic.com>
Ensure fatal errors from the feedback options configurator are rethrown
instead of being handled as recoverable callback failures.

Co-Authored-By: Claude <noreply@anthropic.com>

@lbloder lbloder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

@adinauer
adinauer marked this pull request as ready for review October 13, 2026 08:11
@adinauer
adinauer merged commit 155fa5a into fix/callback-error-handling Oct 13, 2026
64 of 65 checks passed
@adinauer
adinauer deleted the fix/callback-error-handling-user-feedback branch October 13, 2026 08:11
@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- Handle feedback configurator failures ([#6239](https://github.com/getsentry/sentry-java/pull/6239))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 2afa056

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