Skip to content

Commit 08377ad

Browse files
adinauerclaude
andcommitted
test(android): Verify configurator propagates fatal errors
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>
1 parent e32efe0 commit 08377ad

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎sentry-android-core/src/test/java/io/sentry/android/core/SentryUserFeedbackFormTest.kt‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ class SentryUserFeedbackFormTest {
223223
.isEqualTo("configured title")
224224
}
225225

226+
@Test
227+
fun `when configurator throws a fatal error, it is not swallowed`() {
228+
val failure = OutOfMemoryError("configurator failed")
229+
230+
val thrown =
231+
assertFailsWith<OutOfMemoryError> { fixture.getSut(configurator = { throw failure }) }
232+
233+
assertThat(thrown).isSameInstanceAs(failure)
234+
}
235+
226236
@Test
227237
fun `dialog window does not have FLAG_ALT_FOCUSABLE_IM so soft keyboard can appear`() {
228238
fixture.options.isEnabled = true

0 commit comments

Comments
 (0)