2018-06-27 09:19:41 +02:00
|
|
|
package sonia.scm.api.rest;
|
|
|
|
|
|
2018-08-21 07:53:33 +02:00
|
|
|
import sonia.scm.AlreadyExistsException;
|
2018-10-26 14:54:55 +02:00
|
|
|
import sonia.scm.api.v2.resources.ExceptionWithContextToErrorDtoMapper;
|
2018-06-27 09:19:41 +02:00
|
|
|
|
2018-10-26 14:54:55 +02:00
|
|
|
import javax.inject.Inject;
|
2018-06-27 09:19:41 +02:00
|
|
|
import javax.ws.rs.core.Response.Status;
|
|
|
|
|
import javax.ws.rs.ext.Provider;
|
|
|
|
|
|
|
|
|
|
@Provider
|
2018-10-26 14:20:19 +02:00
|
|
|
public class AlreadyExistsExceptionMapper extends ContextualExceptionMapper<AlreadyExistsException> {
|
2018-10-26 14:54:55 +02:00
|
|
|
@Inject
|
|
|
|
|
public AlreadyExistsExceptionMapper(ExceptionWithContextToErrorDtoMapper mapper) {
|
|
|
|
|
super(AlreadyExistsException.class, Status.CONFLICT, mapper);
|
2018-06-27 09:19:41 +02:00
|
|
|
}
|
|
|
|
|
}
|