mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 18:26:16 +01:00
Add handling when duplicated branch part cannot be created (#1692)
Add handling when duplicated branch cannot be created because a part of the name already exists as a branch
This commit is contained in:
@@ -37,6 +37,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.AlreadyExistsException;
|
||||
import sonia.scm.BadRequestException;
|
||||
import sonia.scm.BranchAlreadyExistsException;
|
||||
import sonia.scm.ConcurrentModificationException;
|
||||
import sonia.scm.NotFoundException;
|
||||
import sonia.scm.ScmConstraintViolationException;
|
||||
@@ -91,6 +92,7 @@ public class RestDispatcher {
|
||||
public EnhanceableExceptionMapper() {
|
||||
registerException(NotFoundException.class, Status.NOT_FOUND);
|
||||
registerException(AlreadyExistsException.class, Status.CONFLICT);
|
||||
registerException(BranchAlreadyExistsException.class, Status.CONFLICT);
|
||||
registerException(ConcurrentModificationException.class, Status.CONFLICT);
|
||||
registerException(UnauthorizedException.class, Status.FORBIDDEN);
|
||||
registerException(AuthorizationException.class, Status.FORBIDDEN);
|
||||
|
||||
Reference in New Issue
Block a user