/*
* ============================================================================
*
* Copyright (C) 2011 - 2013 Talend Inc. - www.talend.com
*
* This source code is available under agreement available at
* %InstallDIR%\license.txt
*
* You should have received a copy of the agreement
* along with this program; if not, write to Talend SA
* 9 rue Pages 92150 Suresnes, France
*
* ============================================================================
*/
package org.talend.esb.auxiliary.storage.service.rest;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
public class ParseExceptionMapper implements ExceptionMapper<RuntimeException>{
@Override
public Response toResponse(RuntimeException e) {
return Response.status(Status.BAD_REQUEST).type("text/plain").entity(e.getMessage()).build();
}
}