Check delete change with PermissionBackend
Deleting the entire change is slightly differently from deleting a draft patch set. Update only the change deletion path. Update test assertions to expect the new generic messages thrown by the PermissionBackend. Change-Id: If5a83e386304d8f84db37f6c02f9c35cd5ae4266
This commit is contained in:

committed by
David Pursehouse

parent
b5798658f5
commit
79ce708c38
@@ -375,7 +375,7 @@ class ChangeApiImpl implements ChangeApi {
|
||||
public void delete() throws RestApiException {
|
||||
try {
|
||||
deleteChange.apply(change, null);
|
||||
} catch (UpdateException e) {
|
||||
} catch (UpdateException | PermissionBackendException e) {
|
||||
throw new RestApiException("Cannot delete change", e);
|
||||
}
|
||||
}
|
||||
|
@@ -262,7 +262,7 @@ class RevisionApiImpl implements RevisionApi {
|
||||
public void delete() throws RestApiException {
|
||||
try {
|
||||
deleteDraft.apply(revision, null);
|
||||
} catch (UpdateException e) {
|
||||
} catch (UpdateException | OrmException | PermissionBackendException e) {
|
||||
throw new RestApiException("Cannot delete draft ps", e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user