All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nitorcreations.nflow.rest.config.BadRequestExceptionMapper Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package com.nitorcreations.nflow.rest.config;

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

@Provider
public class BadRequestExceptionMapper implements ExceptionMapper {
  @Override
  public Response toResponse(BadRequestException e) {
    return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy