jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] WebApplicationException Response entity and exception mappers

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 13 Nov 2012 17:25:52 +0000

Hi,

CXF user has pointed out that the specification requires that WAE
exception mapper is not to be used to map a given WAE to Response if
WAE Response entity is not null.

Is it what Jersey and RestEasy do ? CXF lets custom WAE mappers manage
all WAEs, though of course the custom mapper may choose to somehow
modify the original WAE Response entity if any.

I'd rather prefer the mappers see all WAEe (and say NotFoundException
mappers see all the NFE exceptions, whether or not NFE Response entity
is null), example, to make sure all WAE isntances can be given some
common treatment like logging them, etc.

Sergey