users@jersey.java.net

Re: [Jersey] Re: Guidelines on which response code to use

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Wed, 22 Sep 2010 15:53:53 -0700

See here:

http://greenbytes.de/tech/webdav/rfc2616.html#status.403

"The server understood the request, but is refusing to fulfill it"

"If the server does not wish to make this information available to the
client, the status code 404 (Not Found) can be used instead."

http://greenbytes.de/tech/webdav/rfc2616.html#status.404

Paul.

On Sep 20, 2010, at 11:47 AM, tofferliu wrote:

>
> Hi Martin,
>
> I may be wrong here but this is why I think it unintuitive. Let may
> change
> my example to make it a bit clearer.
>
> If I had a method buildCar() which takes the arguments EngineId,
> ChasisId,
> WheelId and returns CarId upon success. And a make a request in
> which all
> the arguments passed in are valid well-formed Ids but it turns out
> there is
> no such chasis with the given Id.
>
> Returning a 404 in this case is unintuitive to me because the
> service is not
> a load/store resource but a factory resource. Returning a 404 would
> mean
> that the factory resource is unavailable, which is not the case it
> is merely
> not able to perform the operation because one of the arguments could
> not be
> located in the repository.
>
> -Toffer
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Guidelines-on-which-response-code-to-use-tp5544231p5551788.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>