ChangeJson: Replace log-and-continue with errors

If a commit can't be read, that should result in an error response. It
might be transient, but clients should try again rather than being
mystified that the commit object is missing from the revision.

Change-Id: I2964af94569d5959209939b9864c9c260bd82e9a
This commit is contained in:
Dave Borowitz
2015-02-18 14:38:47 -08:00
parent ca4ebea366
commit 6cb912f549

View File

@@ -870,7 +870,7 @@ public class ChangeJson {
try {
out.commit = toCommit(in, cd.change().getProject(), has(WEB_LINKS));
} catch (PatchSetInfoNotAvailableException e) {
log.warn("Cannot load PatchSetInfo " + in.getId(), e);
throw new OrmException(e);
}
}
@@ -879,7 +879,7 @@ public class ChangeJson {
out.files = fileInfoJson.toFileInfoMap(cd.change(), in);
out.files.remove(Patch.COMMIT_MSG);
} catch (PatchListNotAvailableException e) {
log.warn("Cannot load PatchList " + in.getId(), e);
throw new OrmException(e);
}
}