Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CBB01004D for ; Tue, 28 Apr 2015 12:57:06 +0000 (UTC) Received: (qmail 68678 invoked by uid 500); 28 Apr 2015 12:57:06 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 68641 invoked by uid 500); 28 Apr 2015 12:57:06 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 68628 invoked by uid 99); 28 Apr 2015 12:57:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 12:57:06 +0000 Date: Tue, 28 Apr 2015 12:57:05 +0000 (UTC) From: =?utf-8?Q?Vojt=C4=9Bch_Kr=C3=A1sa_=28JIRA=29?= To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6376) Unexpected exception thrown from ResponseHandler is swallowed and status code 200 is returned MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6376?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Vojt=C4=9Bch Kr=C3=A1sa updated CXF-6376: ------------------------------- Description:=20 quickstart: https://github.com/krasa/cxf-bug mvn jetty:run GET http://localhost:8080/cxf/rest/foo -> 200 is returned, while the log prints javax.ws.rs.NotFoundException, but= no mention about the exception which occured inside the ResponseHandler=20 Such error can silently break the application: {code} import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.ext.ResponseHandler; import org.apache.cxf.jaxrs.model.OperationResourceInfo; import org.apache.cxf.message.Message; public class ErrorResponseHandler implements ResponseHandler { =09@Override =09public Response handleResponse(Message m, OperationResourceInfo ori, Res= ponse response) { =09=09System.out.println("throwing NPE"); =09=09throw new NullPointerException(); =09} } {code} was: quickstart: https://github.com/krasa/cxf-bug mvn jetty:run GET http://localhost:8080/cxf/rest/foo -> 200 is returned, while the log prints javax.ws.rs.NotFoundException, but= no mention about NPE Such error can silently break the application: {code} import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.ext.ResponseHandler; import org.apache.cxf.jaxrs.model.OperationResourceInfo; import org.apache.cxf.message.Message; public class ErrorResponseHandler implements ResponseHandler { =09@Override =09public Response handleResponse(Message m, OperationResourceInfo ori, Res= ponse response) { =09=09System.out.println("throwing NPE"); =09=09throw new NullPointerException(); =09} } {code} > Unexpected exception thrown from ResponseHandler is swallowed and status = code 200 is returned > -------------------------------------------------------------------------= -------------------- > > Key: CXF-6376 > URL: https://issues.apache.org/jira/browse/CXF-6376 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.7.15 > Reporter: Vojt=C4=9Bch Kr=C3=A1sa > > quickstart: https://github.com/krasa/cxf-bug > mvn jetty:run > GET http://localhost:8080/cxf/rest/foo > -> 200 is returned, while the log prints javax.ws.rs.NotFoundException, b= ut no mention about the exception which occured inside the ResponseHandler= =20 > Such error can silently break the application: > {code} > import javax.ws.rs.core.Response; > import org.apache.cxf.jaxrs.ext.ResponseHandler; > import org.apache.cxf.jaxrs.model.OperationResourceInfo; > import org.apache.cxf.message.Message; > public class ErrorResponseHandler implements ResponseHandler { > =09@Override > =09public Response handleResponse(Message m, OperationResourceInfo ori, R= esponse response) { > =09=09System.out.println("throwing NPE"); > =09=09throw new NullPointerException(); > =09} > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)