Skip to content

Commit 455e8ee

Browse files
runningcodeclaude
andcommitted
Fix User-Agent header to follow codebase conventions
Replace custom fallback "sentry-android-distribution" with error throw when sentryClientName is null, following the pattern used throughout the codebase where sentryClientName is expected to always be set. Addresses PR review feedback about reusing consistent user agent. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bd94ee7 commit 455e8ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal class DistributionHttpClient(private val options: SentryOptions) {
8181
connection.setRequestProperty("Accept", "application/json")
8282
connection.setRequestProperty(
8383
"User-Agent",
84-
options.sentryClientName ?: "sentry-android-distribution",
84+
options.sentryClientName ?: throw IllegalStateException("sentryClientName must be set"),
8585
)
8686
connection.connectTimeout = options.connectionTimeoutMillis
8787
connection.readTimeout = options.readTimeoutMillis

0 commit comments

Comments
 (0)