Skip to content

Commit 556dc61

Browse files
committed
fix: suppress metadata polling timeout from Bugsnag notifications
Replace IllegalStateException with GetIntentMetadataError.Timeout so the expected polling timeout is treated as a non-notifiable server error.
1 parent b689edd commit 556dc61

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

services/opencode/src/main/kotlin/com/getcode/opencode/controllers/TransactionController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class TransactionController @Inject constructor(
399399
.map { Result.success(it) }
400400
.catch { emit(Result.failure(it)) }
401401
.firstOrNull()
402-
?: Result.failure(IllegalStateException("Never received the desired metadata"))
402+
?: Result.failure(GetIntentMetadataError.Timeout())
403403
}
404404

405405
override suspend fun checkWithdrawalAvailability(

services/opencode/src/main/kotlin/com/getcode/opencode/model/core/errors/Errors.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ sealed class GetIntentMetadataError(
162162
) : CodeServerError(message, cause) {
163163
class NotFound : GetIntentMetadataError("Not found")
164164
class Denied : GetIntentMetadataError("Denied")
165+
class Timeout : GetIntentMetadataError("Never received the desired metadata")
165166
class Unrecognized : GetIntentMetadataError("Unrecognized"), NotifiableError
166167
data class Other(override val cause: Throwable? = null) : GetIntentMetadataError(message = cause?.message, cause = cause), NotifiableError
167168
}

0 commit comments

Comments
 (0)