Hi,

I see that registered ExceptionMapper is not invoked on the client side, if 
service interface returns Response.
Not sure is it JAX-RS specified or desired behaviour.

>From one side client has enough information in Response to deal with errors.
>From other side, if service interface has mix of methods returning Response 
>and normal objects, it causes code like this for all "Response" methods:
        Response response = connectorService.create(connectorTO);
        if (response.getStatus() != org.apache.http.HttpStatus.SC_CREATED) {
            throw (RuntimeException) 
clientExceptionMapper.fromResponse(response);
        }

I can imagine that even for methods returning Response, client exception mapper 
is invoked for error response codes.
WDYT?

Regards,
Andrei.

Reply via email to