Change BatchRefUpdate error into a 500 error instead of 409

Change-Id: I490408f1d36c5f3b79be503500d3a969bb027866
This commit is contained in:
Zhen Chen
2016-09-29 11:49:42 -07:00
parent 1a9243ea9e
commit 5406d7aa80

View File

@@ -682,7 +682,7 @@ public class BatchUpdate implements AutoCloseable {
}
private void executeRefUpdates(boolean dryrun)
throws IOException, UpdateException {
throws IOException, RestApiException {
if (commands == null || commands.isEmpty()) {
logDebug("No ref updates to execute");
return;
@@ -706,7 +706,7 @@ public class BatchUpdate implements AutoCloseable {
}
}
if (!ok) {
throw new UpdateException("BatchRefUpdate failed: " + batchRefUpdate);
throw new RestApiException("BatchRefUpdate failed: " + batchRefUpdate);
}
}