On Wed, Mar 31, 2010 at 03:06, Michael Yin <[email protected]> wrote: > I would argue that errors should be given an appropriate response. Most of > the other actions that I've seen return appropriate error responses, such as > doing xpath searches with improper syntax returns a 500 or when a resource > isn't found, returning a 404. You can still output HTML with a non-200 > response. Otherwise it just seems inconsistent.
By default, http error codes should be set. This behavior can be controlled via the ":status" parameter. http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet%2528servlets.post%2529-%257B%257B%253Astatus%257D%257D The reason for having 200's in some cases is when using ajax/iframe requests from browsers, where non-200 responses might get lost. Regards, Alex -- Alexander Klimetschek [email protected]
