Files REST endpoint: Don't parse non-existing files
Rather fail with ResourceNotFoundException. This is e.g. important for the GetDiff REST endpoint as it returns an empty diff for non-existing files. As result the diff screen shows an empty diff for any non-existing file, but users expect to see an error. This change may break existing users of the extension API since the RevisionApi#file(String) is now throwing RestApiException. Change-Id: If0c172818b553129145f5ccd2f99e19b94472cce Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -47,7 +47,7 @@ public interface RevisionApi {
|
||||
Map<String, FileInfo> files() throws RestApiException;
|
||||
Map<String, FileInfo> files(String base) throws RestApiException;
|
||||
Map<String, FileInfo> files(int parentNum) throws RestApiException;
|
||||
FileApi file(String path);
|
||||
FileApi file(String path) throws RestApiException;
|
||||
MergeableInfo mergeable() throws RestApiException;
|
||||
MergeableInfo mergeableOtherBranches() throws RestApiException;
|
||||
|
||||
|
Reference in New Issue
Block a user