[jax-rs-spec users] [jsr339-experts] Response.readEntity and HTTP errors

From: Sergey Beryozkin <>
Date: Tue, 3 Dec 2013 16:19:13 +0000



Response r = myClient.get();
assertEquals(404, r.getStatus());


At the moment CXf throws ProcessingException; ISE is also mentioned in
the docs, probably cleaner for 404, though we can have an HTTP error
with the actual text - so we will still end up with ProcessingException.

However, if we have a status >= 300, then should


actually throw a WebApplicationException subclass such as
NotFoundException if an entity type is not InputStream ?

Or may be ProcessingException should have a linked
WebApplicationException in such cases ?

Do you agree it will make sense to review it for 2.1 ?