On 30 May 2007, at 22:56, Jim Alateras wrote:
I'm fine with the design choice. I stumbled across a place where
this wasn't happening [1] but it was hard to associate a HTTP
status code with the failure since the request failed to leave the
client. Currently I have patched it to set the following status code
response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
You can't use 404 for this, a typical REST application could PUT
something after the 404. Also then there would be no way to see if it
was a real 404.
I think wrong hostname (or network connectivity problems) means an
IOException should be thrown, just like when trying to do getEntity
().getText(). After all, we are still talking about the internet, and
a number of different connectivity issues could occur that can't be
described using HTTP status codes.
--
Stian Soiland, myGrid team
School of Computer Science
The University of Manchester
http://www.cs.man.ac.uk/~ssoiland/