summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2021-12-23 01:49:12 +0000
committerLuca Milanesio <luca.milanesio@gmail.com>2021-12-23 01:49:12 +0000
commit8aa911a6c1fab48955462dbf7f03a1d2893d0797 (patch)
treea59ad3b574789b5efe171bb9a708db129767b2b2
parent0bb9f91c44760dee3ee571abe6f8c9aef3655f9e (diff)
Log the exception that caused the user's deactivation to fail
When failing to deactivate an account because of a resource conflict, the additional details of the exception helps the Gerrit admin to understand where the problem is coming from. The ResourceConflictException is typically triggered by the account being already inactive; however, it is also thrown in other points of the code and having the exception with the stack-trace helps troubleshooting deactivation issues. Change-Id: Idcb75f6c5b8fc63f6afb1f48bfe2f51a0c25188a
-rw-r--r--java/com/google/gerrit/server/account/AccountDeactivator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/google/gerrit/server/account/AccountDeactivator.java b/java/com/google/gerrit/server/account/AccountDeactivator.java
index ac02322f46..3c33c98ee9 100644
--- a/java/com/google/gerrit/server/account/AccountDeactivator.java
+++ b/java/com/google/gerrit/server/account/AccountDeactivator.java
@@ -117,7 +117,7 @@ public class AccountDeactivator implements Runnable {
return true;
}
} catch (ResourceConflictException e) {
- logger.atInfo().log("Account %s already deactivated, continuing...", userName);
+ logger.atInfo().withCause(e).log("Account %s already deactivated, continuing...", userName);
} catch (Exception e) {
logger.atSevere().withCause(e).log(
"Error deactivating account: %s (%s) %s",