On Tue, Aug 19, 2008 at 1:08 AM, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > > On Tue, Aug 19, 2008 at 8:20 AM, Sok Ann Yap <[EMAIL PROTECTED]> wrote: >> Returning 400 for form validation error is recommended by Leonard >> Richardson and Sam Ruby in the book RESTful Web Services. Here's an >> excerpt from one of the examples in the book > > Also if they didn't say it... it's just that 200 OK is plain wrong to > signal an error condition. > That's what 4xx and 5xx codes are for. > Even though I agree in principle, there is no 4xx code to signal an "error in the value of the parameters", please remember that http is a transport protocol, and from that perspective it was a successful transfer. I believe that trying to return http status codes for application logic is violating the TCP layer division that has held us in place for so long.
Building up on the json example, it should be read as, the request was successful and everything when ok (http:200) now it seems you fail with supplying the correct values (statusCode:xxx) as for the webservices reference, I don't think that applies to web-browsers, they could even interpret the 400 as something totally different. That said if enough people find this useful I'll say add a config option where you can switch it and leave it as 200 for default. > > -- > Lawrence, stacktrace.it - oluyede.org - neropercaso.it > "It is difficult to get a man to understand > something when his salary depends on not > understanding it" - Upton Sinclair > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
