ec.gob.senescyt.sniese.commons.exceptions.mappers.TransientPropertyValueExceptionMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sniese-commons Show documentation
Show all versions of sniese-commons Show documentation
Librería que contiene clases de uso comun para sniese hechos en dropwizard
package ec.gob.senescyt.sniese.commons.exceptions.mappers;
import org.hibernate.TransientPropertyValueException;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
public class TransientPropertyValueExceptionMapper implements ExceptionMapper {
public static final String MENSAJE_COMUN = "el objeto no existe en base";
@Override
public Response toResponse(TransientPropertyValueException exception) {
return Response.status(BAD_REQUEST)
.entity(MENSAJE_COMUN)
.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy