You might need to explain where your errorAction comes from since the ZF doesn't distribute controllers (except via the project management stuff on CLI). You are correct - if the request is not a routing error you can pin on the user, most other errors should carry an Internal Error code. You should be able to edit your error controller for this.
http://www.survivethedeepend.com/zendframeworkbook/en/1.0/handling.application.errors.gracefully
Paddy
Pádraic Brady
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: Exception e <exceptione@hotmail.com>
To: fw-mvc@lists.zend.com
Sent: Sat, December 12, 2009 9:53:41 PM
Subject: [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.
http://www.survivethedeepend.com/zendframeworkbook/en/1.0/handling.application.errors.gracefully
Paddy
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative
From: Exception e <exceptione@hotmail.com>
To: fw-mvc@lists.zend.com
Sent: Sat, December 12, 2009 9:53:41 PM
Subject: [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.
没有评论:
发表评论