Hi,
On Tue, Mar 19, 2013 at 09:10:40AM -0700, James Cooper wrote:
> My interpretation is that "-32000 to -32099 Server error Reserved for
> implementation-defined server-errors." means that the JSON-RPC
> implementation (e.g. Zend framework's JSON-RPC impl) can use this range for
> implementation specific errors.
>
> Whereas "The remainder of the space is available for application defined
> errors." means that folks writing apps using the JSON-RPC implementation
> can use any other number as an error code. For example, you write a
> service with a method "foo()" that raises errors 1000, 1001, 1002. That's
> fine.
>
> To summarize, I think the spec intends "implementation-defined" to be
> errors raised directly by the framework/library, as opposed to "application
> defined" which are raised by arbitrary code written by users of the
> framework/library.
your interpretation is completely correct.
-32768 to -32000 are reserved for pre-defined errors,
-32099 to -32000 are reserved for JSON-RPC-server/framework/library-implementations,
codes > -32000 (and < -32768) can freely be used by applications.
Roland