2009年12月12日星期六

[fw-mvc] errorAction: why no 500 http-status for default error conditions?

the routing exceptions are given a 'HTTP/1.1 404 Not Found' header:
Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,
Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION.

That is correct of course.
But why are the other errors not given a 500 http status? There is an error
condition right? So why do we send status 200 OK if we still know there is
an error?

My json-client needs to know when there is an error for example, and with
the current recommendations the client will think everything was ok even
when there was an error on the server.

Is there a good explanation for the current behaviour? Otherwise I would
like to bring up an documentation enhancement request.


--
View this message in context: http://n4.nabble.com/errorAction-why-no-500-http-status-for-default-error-conditions-tp962709p962709.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: