Jersey ExceptionMapper not being invoked
问题 I am trying to invoke this exception mapper to return a 404 not found response but it keeps returning 500 internal error. Jersey version is 2.22.1. Code snippet below. Appreciate all help. Thanks. Exception mapper class. package org.learn.rest.messengerdemo.exception; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; @Provider public class DataNotFoundExceptionMapper implements ExceptionMapper