Skip to content

Commit

Permalink
feat: AccessDeniedException异常捕获TencentBlueKing#2647
Browse files Browse the repository at this point in the history
  • Loading branch information
zacYL authored Oct 16, 2024
1 parent 5c72f57 commit 0cb7646
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ class StorageHealthMonitor(
try {
val future = executorService.submit { checker.clean() }
future.get(1, TimeUnit.SECONDS)
} catch (exception: ExecutionException) {
val errorMsg = "Clean checker error: $exception"
if (exception.cause is AccessDeniedException) {
logger.error(errorMsg, exception)
} else {
logger.warn(errorMsg, exception)
}
} catch (exception: Exception) {
logger.warn("Clean checker error: $exception", exception)
}
Expand Down

0 comments on commit 0cb7646

Please sign in to comment.