Yes, you're absolutely right, that's in the JAX RS specifications. I was just 
wondering whether RESTlet had an extension to the basic specifications that 
allowed more control over what error code was used (an @Error(400) annotation, 
for example).

The different for the user, if we're talking about a web user, is slim at best. 
An error occurred but that's not really his problem, the UI should have 
sheltered him from such basic syntax errors.

For the developer writing a client application, however, it can save a lot of 
time. Knowing precisely why your implementation fails is always preferable in 
my opinion than just having a generic "failed" error.
I'm oversimplifying things here, but that's the difference between throwing a 
NumberFormatException and a generic Exception.

Apologies if I'm taking the debate too far, I'm aware that RESTlet is following 
the specifications to the letter and am not complaining about that at all. To 
be honest, I should have asked that question to the JAX RS design group but 
couldn't find any public forum and thought that since Jérome Louvel sits at 
that comity and is working on the implementation of the specifications that I'm 
using, this would be the next best place to voice my questions...

Regards,
Nicolas

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2381083

Reply via email to