Subject: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct
From: YI YUE <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 27 Jul 2023 15:56:20 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

I noticed that in jsonrpc.el, the function `jsonrpc-error' will singal a `jsonrpc-error' error

with error code 32603, but in JSON-RPC 2.0 Specification[1], the error code is -32603

Here is the original code starts at jsonrpc.el line 224:

(signal 'jsonrpc-error

`(,msg

(jsonrpc-error-code . ,32603)

(jsonrpc-error-message . ,msg)))

I think it should be:

(signal 'jsonrpc-error

`(,msg

(jsonrpc-error-code . -32603)

(jsonrpc-error-message . ,msg)))

Regards.

[1]: https://www.jsonrpc.org/specification