Skip to content

Commit 12cc484

Browse files
committed
better authentication exception messages
1 parent 26e50f1 commit 12cc484

File tree

1 file changed

+2
-2
lines changed
  • src/commonMain/kotlin/com.adamratzman.spotify

1 file changed

+2
-2
lines changed

src/commonMain/kotlin/com.adamratzman.spotify/Builder.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class SpotifyClientApiBuilder(
306306
} catch (e: CancellationException) {
307307
throw e
308308
} catch (e: Exception) {
309-
throw SpotifyException.AuthenticationException("Invalid credentials provided in the login process", e)
309+
throw SpotifyException.AuthenticationException("Invalid credentials provided in the login process (clientId=$clientId, clientSecret=$clientSecret, authCode=${authorization.authorizationCode})", e)
310310
}
311311
authorization.token != null -> SpotifyClientApi(
312312
clientId,
@@ -424,7 +424,7 @@ class SpotifyAppApiBuilder(
424424
} catch (e: CancellationException) {
425425
throw e
426426
} catch (e: Exception) {
427-
throw SpotifyException.AuthenticationException("Invalid credentials provided in the login process", e)
427+
throw SpotifyException.AuthenticationException("Invalid credentials provided in the login process (clientId=$clientId, clientSecret=$clientSecret)", e)
428428
}
429429
}
430430
}

0 commit comments

Comments
 (0)