MergeOp: Log IntegrationExceptions that are treated as conflict only as warning
We convert IntegrationExceptions into ResourceConflictExceptions. This
means for the caller this is a 409 Conflict and not an error. If it's
not an error we should not log it at severe level. For example such an
IntegrateException occurs if a change cannot be submitted because there
is a conflict with the destination branch.
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I0ae5186fae346c71bad473092bb554e43c03515e
diff --git a/java/com/google/gerrit/server/submit/MergeOp.java b/java/com/google/gerrit/server/submit/MergeOp.java
index a06027a..406c0a1 100644
--- a/java/com/google/gerrit/server/submit/MergeOp.java
+++ b/java/com/google/gerrit/server/submit/MergeOp.java
@@ -504,7 +504,7 @@
try {
integrateIntoHistory(cs);
} catch (IntegrationException e) {
- logger.atSevere().withCause(e).log("Error from integrateIntoHistory");
+ logger.atWarning().withCause(e).log("Error from integrateIntoHistory");
throw new ResourceConflictException(e.getMessage(), e);
}
return null;