Re: [Jersey] Jersey's (experimental) approach to support hypermedia constraint

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Feb 2010 22:35:21 +0100

On Feb 10, 2010, at 10:08 PM, Jan Algermissen wrote:

> On Feb 10, 2010, at 9:53 PM, Paul Sandoz wrote:
>> I think we are having problems with terminology.
>> A 4xx response does represent a client error or failure on the part
>> of the client, which i agree has to be dealt with and not ignored.
>> I am suggesting it can be useful to handle such responses as Java
>> exceptions because they are often not the most common form of
>> response.
> Ok. I assumed you'd say this. I chose to state my position in an
> extreme fashion to help communication.


> Basically I agree with what you say above. However, I think
> excetions can cause developers to think they only happen in
> unforseeable conditions and could not be delt with.

Agreed that can be an issue.

> (Personally, I would use exceptions in my code, too. At least for
> those 4xx that I do not intend to handle.)
> Jan
> P.S.
> Maybe farfetched, but...
> One consequence of truly applying REST could be to make a business
> decision to actively accept that evolving servers can lead to 4xx
> responses and to establish a procedure how to deal actively with
> them and to account for the business transactions lost during the
> time it takes to evolve the client to work with the evolved server.
> For example, I might have a 406 trigger a request to a service
> support team to take action and add some media type capabilities to
> the client that 'broke'. Other 4xx responses I would probably just
> handle as an unkonw error tp be investigated.

It's getting late here, i need sleep and coffee to think over that :-)