mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
Introduce generic BadRequestException
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package sonia.scm.api.rest;
|
||||
|
||||
import sonia.scm.BadRequestException;
|
||||
import sonia.scm.api.v2.resources.ExceptionWithContextToErrorDtoMapper;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
@Provider
|
||||
public class BadRequestExceptionMapper extends ContextualExceptionMapper<BadRequestException> {
|
||||
@Inject
|
||||
public BadRequestExceptionMapper(ExceptionWithContextToErrorDtoMapper mapper) {
|
||||
super(BadRequestException.class, Response.Status.BAD_REQUEST, mapper);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user