ZF-3751: handle() faults from unknown methods always result in "An unknown error occured. Please try again."

Issue Type: Bug Created: 2008-07-24T19:58:59.000+0000 Last Updated: 2008-11-13T14:10:20.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Dan Makovec (dmakovec) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Rest_Server

Related issues: Attachments:


When handle() is called with no method at all, or an undefined method, the fault always returned is "An unknown error occured. Please try again."

This is because handle() on lines 216 to 223 always calls $this->fault(, 404).

fault() in turn on lines 442-448 determines that $exception, the first argument passed into it, is a string and not an Exception instance, and promptly throws "An unknown error occured. Please try again." out as the error.

Suggested fix: change lines 217, 220 and 223 to the format: $result = $this->fault(new Zend_Rest_Exception(, 404);


Posted by Benjamin Eberlei (beberlei) on 2008-11-07T04:44:33.000+0000

Fixed issue in trunk and added some testcases. Correct fault messages are now returned in REST response.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:20.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.