Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 42FD4200BC6 for ; Sun, 20 Nov 2016 19:39:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 41800160B1B; Sun, 20 Nov 2016 18:39:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8B9BC160AFE for ; Sun, 20 Nov 2016 19:38:59 +0100 (CET) Received: (qmail 1411 invoked by uid 500); 20 Nov 2016 18:38:58 -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 1396 invoked by uid 99); 20 Nov 2016 18:38:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Nov 2016 18:38:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A3A3D2C4C70 for ; Sun, 20 Nov 2016 18:38:58 +0000 (UTC) Date: Sun, 20 Nov 2016 18:38:58 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CXF-7119) ResponseExceptionMapper not used for technical exceptions (e.g. IOException) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 20 Nov 2016 18:39:00 -0000 [ https://issues.apache.org/jira/browse/CXF-7119?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin resolved CXF-7119. ----------------------------------- Resolution: Fixed Assignee: Sergey Beryozkin Fix Version/s: NeedMoreInfo > ResponseExceptionMapper not used for technical exceptions (e.g. IOExcepti= on) > -------------------------------------------------------------------------= --- > > Key: CXF-7119 > URL: https://issues.apache.org/jira/browse/CXF-7119 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.1.3 > Reporter: J=C3=B6rg Hohwiller > Assignee: Sergey Beryozkin > Fix For: NeedMoreInfo > > > When using CXF for REST/JAX-RS service clients I quickly noticed that I n= eed to tweak the error handling. My services use an ExceptionMapper that pr= ovides error details via JSON result payload. Hence I want to access this a= nd render an exception with further details and more context information wh= at works fine with ResponseExceptionMapper.=20 > However, when a technical error (IOException such as unkown host, connect= ion refused, timeout, etc.) occurrs I only get generic errors from CXF clie= nt (org.apache.cxf.interceptor.Fault: Could not send Message.). This is und= esired but unfortunately my custom ResponseExceptionMapper is never called = for such technical errors. There seems to be no way to archive my goal with= CXF itself. I could only wrap the client again with a custom written dynam= ic proxy to reach my goal. > It seems that CXF hardwires this behaviour: > https://github.com/apache/cxf/blob/master/rt/rs/client/src/main/java/org/= apache/cxf/jaxrs/client/AbstractClient.java#L596 > https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/c= xf/interceptor/MessageSenderInterceptor.java#L64 > It would be awesome if in such case ResponseExceptionMapper would also be= applied so I have the chance to interfere and produce better exceptions (e= .g. with a message containing the name of the application/microservice that= could not be called, the URL, etc.) for my individual needs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)