users@jersey.java.net

Re: [Jersey] Why do IllegalArgumentExceptions cause a 404 instead of a 400?

From: DirkM <dirk_at_olx.com>
Date: Fri, 14 Aug 2009 15:00:47 -0500 (CDT)

Paul Sandoz wrote:
>
> The EG opted for a 404 when extracting parameters from URI because
> strictly speaking if a String cannot be converted to say Integer then
> it is a matching error with the URI.
>

Thanks for the quick response Paul.

I guess you could look at it that way, but it seems quite unintuitive to me
as a web developer, as opposed to someone initiated with the details of the
JAX-RS standard.

The http://www.ietf.org/rfc/rfc2616.txt HTTP standard states:
10.4.1 400 Bad Request

   The request could not be understood by the server due to malformed
   syntax. The client SHOULD NOT repeat the request without
   modifications.


-- 
View this message in context: http://n2.nabble.com/Why-do-IllegalArgumentExceptions-cause-a-404-instead-of-a-400--tp3447019p3447207.html
Sent from the Jersey mailing list archive at Nabble.com.