users@jersey.java.net

RE: [Jersey] Issue 167: client API failing when using message body readers

From: Markus KARG <markus.karg_at_gmx.net>
Date: Wed, 7 Jan 2009 19:44:54 +0100

Assuming that I did understand correctly what you meant ;-) I am sharing
your opinion.

Regards
Markus

> -----Original Message-----
> From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> Sent: Mittwoch, 7. Januar 2009 17:45
> To: users_at_jersey.dev.java.net
> Subject: [Jersey] Issue 167: client API failing when using message body
> readers
>
> Hi,
>
> The Jersey supplied message body readers throw WebApplicationException
> which then thrown causes the client side to throw a null pointer
> exception when the jersey-server module is not present. This is
> because a Response.ResponseBuilder implementation does not exist.
>
> I think the right solution is for such readers to throw a
> MessageBodyReaderException runtime exception which is then mapped on
> the server side to a 400 client error response. Thus such an exception
> on the client sid makes sense to the developer rather than reusing
> WebApplicationException with dummy-based response builder.
>
> This should apply to all the readers in core, atom, multipart etc that
> are capable of detecting client errors.
>
> What do others think?
>
> Paul.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net