io.airlift.airship.shared.VersionConflictExceptionMapper Maven / Gradle / Ivy
package io.airlift.airship.shared;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
public class VersionConflictExceptionMapper implements ExceptionMapper
{
@Override
public Response toResponse(VersionConflictException exception)
{
return Response.status(Status.CONFLICT)
.header(exception.getName(), exception.getVersion())
.build();
}
}