diff --git a/src/main/java/com/nike/cerberus/service/CleanUpService.java b/src/main/java/com/nike/cerberus/service/CleanUpService.java index 5ec57afb5..76fb9b0de 100644 --- a/src/main/java/com/nike/cerberus/service/CleanUpService.java +++ b/src/main/java/com/nike/cerberus/service/CleanUpService.java @@ -94,12 +94,13 @@ protected void cleanUpInactiveAndOrphanedKmsKeys(final int kmsKeysInactiveAfterN TimeUnit.SECONDS.sleep(sleepInSeconds); } catch (InterruptedException ie) { - logger.error("Timeout between KMS key deletion was interrupted"); + logger.error("Timeout between KMS key deletion was interrupted", ie); Thread.currentThread().interrupt(); } catch (Exception e) { logger.error("There was a problem deleting KMS key with id: {}, region: {}", kmsKeyRecord.getAwsIamRoleId(), - kmsKeyRecord.getAwsRegion()); + kmsKeyRecord.getAwsRegion(), + e); } }); } @@ -122,7 +123,8 @@ public void cleanUpOrphanedIamRoles() { awsIamRoleDao.deleteIamRoleById(awsIamRoleRecord.getId()); } catch(Exception e) { logger.error("There was a problem deleting orphaned IAM role with ARN: {}", - awsIamRoleRecord.getAwsIamRoleArn()); + awsIamRoleRecord.getAwsIamRoleArn(), + e); } }); }