package org.jboss.resteasy.test.mapper.resource;
import org.jboss.resteasy.spi.ReaderException;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;

@Provider
public class ReaderExceptionMapper implements ExceptionMapper<ReaderException> {
   public static int STATUS_CODE = 100402;

   public Response toResponse(ReaderException e) {
      return Response.status(STATUS_CODE).entity(e.getMessage()).build();
   }
}
