Skip to content

Commit

Permalink
Add error logging for oneDriveClient.drive(token)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Jun 5, 2023
1 parent dc2b2e0 commit 27d42d4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ class PrometheusCollectorBean(

val accountDrives = accounts.associateWith { account ->
val token = "Bearer ${account.accessToken}"
val driveInfo = oneDriveClient.drive(token)
driveInfo
try {
oneDriveClient.drive(token)
} catch (e: Exception) {
logger.error("Cannot get drive [${account.name}]", e)
throw RuntimeException("Cannot get drive [${account.name}]", e)
}
}

return listOf(
Expand Down

0 comments on commit 27d42d4

Please sign in to comment.