Skip to content

Native Android client for Spotify, built with Jetpack Compose

Relay errors: their body in the log, for the beta debugger

liliapk0bc60f87d30d
diff --git a/base/host-android/src/main/kotlin/app/myspoti/host/android/ControlRelay.kt b/base/host-android/src/main/kotlin/app/myspoti/host/android/ControlRelay.kt
index 27454d7f..46a3bfd1 100644
--- a/base/host-android/src/main/kotlin/app/myspoti/host/android/ControlRelay.kt
+++ b/base/host-android/src/main/kotlin/app/myspoti/host/android/ControlRelay.kt
@@ -85,6 +85,7 @@ internal class ControlRelay(private val view: WebView) {
it.headers.names().forEach { name -> out.put(name, it.header(name)) }
val text = it.body.string()
android.util.Log.d(WebPlayerHost.LOG, "relay $method ${shortPath(url)} -> ${it.code}")
+ if (it.code >= 400) android.util.Log.d(WebPlayerHost.LOG, "relay error body: ${text.take(400)}")
reply(id, it.code, out.toString(), text)
}
}