Replace model object exception with generic ones and migrate guice

This commit is contained in:
René Pfeuffer
2018-08-21 07:53:33 +02:00
parent bb9a0657a5
commit a0f74e3329
227 changed files with 1380 additions and 3549 deletions

View File

@@ -0,0 +1,16 @@
package sonia.scm.api.rest;
import sonia.scm.AlreadyExistsException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
@Provider
public class AlreadyExistsExceptionMapper implements ExceptionMapper<AlreadyExistsException> {
@Override
public Response toResponse(AlreadyExistsException exception) {
return Response.status(Status.CONFLICT).build();
}
}