Skip to content

Commit 6465b7d

Browse files
runningcodeclaude
andcommitted
Update SocketTimeoutException message to mention network connection
Change "check connection speed" to "check network connection" to be more general and align with the goal of distinguishing network connectivity issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 455e8ee commit 6465b7d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sentry-android-distribution/src/main/java/io/sentry/android/distribution/DistributionIntegration.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import io.sentry.SentryLevel
1212
import io.sentry.SentryOptions
1313
import io.sentry.UpdateInfo
1414
import io.sentry.UpdateStatus
15-
import java.io.IOException
16-
import java.net.ConnectException
1715
import java.net.SocketTimeoutException
1816
import java.net.UnknownHostException
1917
import org.jetbrains.annotations.ApiStatus
@@ -75,16 +73,10 @@ public class DistributionIntegration(context: Context) : Integration, IDistribut
7573
"DNS lookup failed - check internet connection",
7674
)
7775
UpdateStatus.UpdateError("No internet connection or invalid server URL")
78-
} catch (e: ConnectException) {
79-
sentryOptions.logger.log(SentryLevel.ERROR, e, "Connection refused - server may be down")
80-
UpdateStatus.UpdateError("Unable to connect to server")
8176
} catch (e: SocketTimeoutException) {
8277
// SocketTimeoutException could indicate either slow network or server issues
8378
sentryOptions.logger.log(SentryLevel.ERROR, e, "Network request timed out")
84-
UpdateStatus.UpdateError("Request timed out - check connection speed")
85-
} catch (e: IOException) {
86-
sentryOptions.logger.log(SentryLevel.ERROR, e, "Network I/O error occurred")
87-
UpdateStatus.UpdateError("Network error occurred")
79+
UpdateStatus.UpdateError("Request timed out - check network connection")
8880
} catch (e: Exception) {
8981
sentryOptions.logger.log(SentryLevel.ERROR, e, "Unexpected error checking for updates")
9082
UpdateStatus.UpdateError("Unexpected error: ${e.message}")

0 commit comments

Comments
 (0)