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

[jsr339-experts] Re: [jax-rs-spec users] Concerns about the client-side exception hierarchy

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 30 Jan 2012 22:48:34 +0000

Hi Bill
On 26/01/12 15:13, Bill Burke wrote:
>
>
> On 1/26/12 9:38 AM, Santiago Pericas-Geertsen wrote:
>> Sergey,
>>
>> I think this is worth exploring. Can you turn this into a JIRA?
>>
>
> +1.
>
> Also, I think we need a richer exception hierarchy than Sergey suggests.
> These would be especially useful when people call methods like
>
> <T> T get(String.class);
>
> i.e.
>
> MethodNotAllowedException
> BadRequestException
> NotAcceptableException
> InternalServerErrorException
> UnauthorizedException
> UnsupportedMediaTypeException
> NotFoundException
>
>
> Finally, these above exceptions would be useful on the server side.
> *NOT* for application code to catch, but rather to write
> ExceptionMappers for. So, Jersey/Resteasy whoever would throw those
> exceptions internally, and applications could write ExceptionMapper for
> those exceptions.
>
> Resteasy implemented these features on client/server after suggestions
> from users.
>
> I'll open a JIRA if we get some agreement on this.
>
I've created a JIRA as suggested by Santiago:
http://java.net/jira/browse/JAX_RS_SPEC-166

Please comment there or create a new one if you prefer.

I'm not 100% sure though if creating many fine-grained exception classes
is the best thing to do right now, may be the response code if any can
be used ?

Thanks, Sergey

> Bill


-- 
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com