|
From: Ryan J. M. <ry...@da...> - 2008-07-07 00:19:55
|
Oh, I don't think so. I just realized I had this response queued up in
my drafts and just wanted to weigh-in is all. On a related note, I did
make the package rename on Thursday night so be sure to take an
update. Also, I'm adding slf4j to the project so we have some type of
logging framework available. I'll be make those commits and publishing
details in the wiki later tonight or Monday morning.
Ryan-
On Jul 6, 2008, at 4:09 PM, Martin Algesten wrote:
>
> An easy enough fix. With your reasoning I +1 404. I take it Bill is
> not disagreeing?
>
> I'm planning to get my patches into the source tree Mon-Tue this week.
>
> Cheers,
> Martin
>
> On 6 Jul 2008, at 14:29, Ryan J. McDonough wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Sorry for the slow response, but I had this sitting in my draft
>> forlder for w while. But I disagree with 400 here and it should be
>> a 404 since an AccountResource identified by a String identifier
>> will never exist. Therefore, if you attempt to access a resource
>> with a String-based ID, it should return a 404 rather than just a
>> 400. Since we can understand the request and know that the resource
>> isn't available, we should return the client a more specific message.
>>
>> Ryan-
>>
>>
>> On Jun 16, 2008, at 3:15 PM, Bill Burke wrote:
>>
>>> I'd say 400. Bad request. Please log jira bug. Thanks.
>>>
>>> Martin Algesten wrote:
>>>>
>>>> In my code I have the following subresource locator:
>>>>
>>>> @Path("{number}")
>>>> public AccountResource getAccount( @PathParam("number") int
>>>> number ) {
>>>>
>>>> This is the only method that can match anything. If I pass in
>>>> something
>>>> that can not get interpreted as a string I get a 500 and a
>>>> NumberFormatException - which doesn't seem entirely right.
>>>> However from
>>>> the spec I struggle to work out what it should be. 404? 400?. I
>>>> plan to
>>>> file it as a bug, but would like to provide a test case for it as
>>>> well -
>>>> so I need to work out the wanted behaviour.
>>>>
>>>> Here's the stack trace:
>>>>
>>>> java.lang.NumberFormatException: For input string: "q"
>>>> at
>>>> java
>>>> .lang
>>>> .NumberFormatException.forInputString(NumberFormatException.java:
>>>> 48)
>>>> at java.lang.Integer.parseInt(Integer.java:447)
>>>> at java.lang.Integer.valueOf(Integer.java:553)
>>>> at
>>>> org
>>>> .resteasy
>>>> .util
>>>> .StringToPrimitive
>>>> .stringToPrimitiveBoxType(StringToPrimitive.java:18)
>>>> at
>>>> org
>>>> .resteasy
>>>> .StringParameterInjector
>>>> .extractValue(StringParameterInjector.java:143)
>>>> at org.resteasy.PathParamInjector.inject(PathParamInjector.java:44)
>>>> at
>>>> org
>>>> .resteasy
>>>> .MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:53)
>>>> at
>>>> org.resteasy.ResourceLocator.createResource(ResourceLocator.java:
>>>> 64)
>>>>
>>>> Martin
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> -------------------------------------------------------------------------
>>>> Check out the new SourceForge.net Marketplace.
>>>> It's the best place to buy or sell services for
>>>> just about anything Open Source.
>>>> http://sourceforge.net/services/buy/index.php
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Resteasy-developers mailing list
>>>> Res...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>>
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> Resteasy-developers mailing list
>>> Res...@li...
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.7 (Darwin)
>>
>> iD8DBQFIcLqwK/xjmUY6JwURAskZAJ0bLmdnBkR4vnpywPg00pnYU6yMOACgjV06
>> 7oGPAdjtQn2NAqN/gNNBwsg=
>> =SRbP
>> -----END PGP SIGNATURE-----
>
|