Skip to content

Commit 2aae940

Browse files
committed
address Seer
1 parent 998f52c commit 2aae940

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

sentry-ktor-client/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ kotlin { explicitApi() }
2121
dependencies {
2222
api(projects.sentry)
2323

24-
api(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
24+
implementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION))
2525
api(projects.sentryKotlinExtensions)
2626

2727
compileOnly(libs.jetbrains.annotations)

sentry-ktor-client/src/main/java/io/sentry/ktorClient/SentryKtorClientUtils.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ internal object SentryKtorClientUtils {
5050
cookies = if (scopes.options.isSendDefaultPii) response.headers["Set-Cookie"] else null
5151
headers = getHeaders(scopes, response.headers)
5252
statusCode = response.status.value
53-
bodySize = response.bodyAsBytes().size.toLong()
53+
try {
54+
bodySize = response.bodyAsBytes().size.toLong()
55+
} catch (_: Throwable) {}
5456
}
5557

5658
event.request = sentryRequest

sentry-samples/sentry-samples-ktor-client/src/main/java/io/sentry/samples/ktorClient/Main.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import kotlinx.coroutines.runBlocking
1111

1212
fun main() {
1313
Sentry.init { options ->
14-
options.dsn =
15-
"https://[email protected]/4508683222843393"
14+
options.dsn = "https://[email protected]/5428563"
1615
options.isDebug = true
1716
options.isSendDefaultPii = true
1817
options.tracesSampleRate = 1.0

0 commit comments

Comments
 (0)