Surround NotAuthorizedException with try catch #2162

This commit is contained in:
Luis Rivas 2023-03-21 22:33:52 -05:00 committed by Alex
parent 62c2defeff
commit 06b7404ecd
1 changed files with 8 additions and 4 deletions

View File

@ -185,10 +185,14 @@ public class TaskServiceImpl implements TaskService {
@Override
public Task forceCancelClaim(String taskId)
throws TaskNotFoundException,
InvalidOwnerException,
NotAuthorizedOnWorkbasketException,
InvalidTaskStateException {
InvalidTaskStateException,
InvalidOwnerException
try {
return this.cancelClaim(taskId, true);
} catch (NotAuthorizedOnWorkbasketException e) {
throw new SystemException(
"this should not have happened. You've discovered a new bug! :D", e);
}
}
@Override