From 0415b5ccc36193a0f1cc913976b9eb56611b2c2d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 25 May 2026 23:32:52 -0400 Subject: [PATCH] fix(android): suppress SwallowedException on the 3 dispatch catches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same pattern as LikesRepository.toggleLike and friends. The catch returns false → the row stays in the queue; that's the whole point of the replayer. Added a comment explaining future diagnostic logging plans. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../cache/mutations/MutationReplayer.kt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/cache/mutations/MutationReplayer.kt b/android/app/src/main/java/com/fabledsword/minstrel/cache/mutations/MutationReplayer.kt index 2c93cdbb..a9be65b3 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/cache/mutations/MutationReplayer.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/cache/mutations/MutationReplayer.kt @@ -126,8 +126,12 @@ class MutationReplayer @Inject constructor( } true } catch ( - @Suppress("TooGenericExceptionCaught") e: Throwable, + @Suppress("TooGenericExceptionCaught", "SwallowedException") e: Throwable, ) { + // Intentional swallow: the row stays in the queue with + // attempts + lastAttemptAt incremented; next drain pass + // retries. Per-attempt diagnostic logging lands when we + // wire up Timber at the replayer level. false } } @@ -147,8 +151,12 @@ class MutationReplayer @Inject constructor( discoverApi.createRequest(body) true } catch ( - @Suppress("TooGenericExceptionCaught") e: Throwable, + @Suppress("TooGenericExceptionCaught", "SwallowedException") e: Throwable, ) { + // Intentional swallow: the row stays in the queue with + // attempts + lastAttemptAt incremented; next drain pass + // retries. Per-attempt diagnostic logging lands when we + // wire up Timber at the replayer level. false } } @@ -159,8 +167,12 @@ class MutationReplayer @Inject constructor( quarantineApi.unflag(decoded.trackId) true } catch ( - @Suppress("TooGenericExceptionCaught") e: Throwable, + @Suppress("TooGenericExceptionCaught", "SwallowedException") e: Throwable, ) { + // Intentional swallow: the row stays in the queue with + // attempts + lastAttemptAt incremented; next drain pass + // retries. Per-attempt diagnostic logging lands when we + // wire up Timber at the replayer level. false } }