Closed pietervogelaar closed 11 years ago
Yeah this has been discussed before, a REST Api should never return a status code higher then 599. Also those kinds of exceptions should be wrapped by your system before being published to a end user
This is actually fixed on current master, iirc...
On Monday, May 27, 2013, Antoine Hedgecock wrote:
Yeah this has been discussed before, a REST Api should never return a status code higher then 599. Also those kinds of exceptions should be wrapped by your system before being published to a end user
— Reply to this email directly or view it on GitHubhttps://github.com/weierophinney/PhlyRestfully/issues/74#issuecomment-18495032 .
Matthew Weier O'Phinney matthew@weierophinney.net http://mwop.net/
Fixed via 9859916 (attached to #68) last week.
When developing a REST API, I started with adding Doctrine 2. My connection parameters where wrong which caused a PDOException in my onFetch method with status code 1045.
This exception is catched in the ResourceController.php and resulted in:
Fatal error: Uncaught exception 'Zend\Http\Exception\InvalidArgumentException' with message 'Invalid status code provided: "1045"' in ......./vendor/zendframework/zendframework/library/Zend/Http/Response.php on line 245