Skip to content

Commit

Permalink
Don't report ResolverLookupFailures to Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
sdsantos committed Nov 25, 2024
1 parent dac9752 commit 9dbec55
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class RunNetTest(

is TaskEvent.StartupFailure,
is TaskEvent.ResolverLookupFailure,
-> {
-> {
val message = when (event) {
is TaskEvent.StartupFailure -> event.message
is TaskEvent.ResolverLookupFailure -> event.message
Expand All @@ -232,22 +232,24 @@ class RunNetTest(
updateResult {
it.copy(
failureMessage =
if (it.failureMessage != null) {
"${it.failureMessage}\n$message"
} else {
message
},
if (it.failureMessage != null) {
"${it.failureMessage}\n$message"
} else {
message
},
)
}
}

val value = when (event) {
is TaskEvent.StartupFailure -> event.value
is TaskEvent.ResolverLookupFailure -> event.value
else -> null
} ?: return
when (event) {
is TaskEvent.StartupFailure ->
Logger.w(message ?: "StartupFailure", Failure(event.value))

is TaskEvent.ResolverLookupFailure ->
Logger.i(message ?: "ResolverLookupFailure", Failure(event.value))

Logger.w(message ?: "Failure", Failure(value))
else -> Unit
}
}

is TaskEvent.BugJsonDump -> {
Expand Down

0 comments on commit 9dbec55

Please sign in to comment.