Issue Type: Bug Created: 2010-01-06T08:25:12.000+0000 Last Updated: 2012-01-20T11:58:05.000+0000 Status: Open Fix version(s): Reporter: Andy Fowler (andyfowler) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Json_Server
Related issues: Attachments:
According to the JSON-RPC http://groups.google.com/group/json-rpc/… , error codes -32768 - -32000 are reserved for JSON-RPC server errors, but all other codes are valid for application-defined use. Currently Zend_Json_Server_Error only allows for server errors to be reported, converting all application errors to -32000.
This is quite obvious in Zend_Server_Json->fault() where the default code is '404', but is instantly converted to -32000 by Zend_Server_Json_Error.
It seems like the resolution should be to drop the current allowedCodes strategy, and simply check that the error code is an integer.
Posted by John Kleijn (448191) on 2012-01-20T11:58:05.000+0000
I reported the same issue (http://framework.zend.com/issues/browse/ZF-11991), but finding this issue dated Janurari 2010 does not make me very hopeful this will be fixed.
So I've decided we will program around it and not use fault(). It is however very dissapointing that a component so simple, an implementation of a spec so simple, can be so royally screwed up and then ignored.
Have you found an issue?
See the Overview section for more details.