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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user