From unknown Wed Jun 18 23:12:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64888 <64888@debbugs.gnu.org> To: bug#64888 <64888@debbugs.gnu.org> Subject: Status: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct Reply-To: bug#64888 <64888@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:12:18 +0000 retitle 64888 28.2; jsonrpc.el; Function jsonrpc-error's error code is not = correct reassign 64888 emacs submitter 64888 YI YUE severity 64888 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 03:05:36 2023 Received: (at submit) by debbugs.gnu.org; 27 Jul 2023 07:05:36 +0000 Received: from localhost ([127.0.0.1]:40589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOv43-0007ct-UW for submit@debbugs.gnu.org; Thu, 27 Jul 2023 03:05:36 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOuvO-0007Ol-3d for submit@debbugs.gnu.org; Thu, 27 Jul 2023 02:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOuvI-0008Ez-Df for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 02:56:32 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOuvG-0000pM-T7 for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 02:56:32 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1bb84194bf3so3730005ad.3 for ; Wed, 26 Jul 2023 23:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690440988; x=1691045788; h=content-transfer-encoding:to:message-id:thread-topic:subject:from :date:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=L7m5UAVlpA3q+K/xzXQQB9owxJ7rKEUug4xJI7RkhvY=; b=GmFe9U1Q8K3QPsI4Jbsw+MYhKMi5EINHFQLJOW14JeGbEJ22rKr69ZxzcxvTpshdgr fH0t7fXnrqRX1fCFAbpkpzpsgxwGZkUye4g9vYmFGWqaOpQG3Epn5p3gM0AtfcAdKSQs lXNfv6OBegYXCYxHenle77tQ68gh5cOVpuwwuQfeLcW3l2Y46lUlXIFkunFx+k6YnoY0 35cLN1Hd3g8EMbzlNM1PW2d3NZjuPsW3hDPg86TgZ6tnrTEFUaKj7tXC6f53gjgb5PaI JvBUyzaOPHrnYDYWFrdE8fpe07LiDA6eeKCXBB4jrnmtCT9QPdGnfXXvmoCoev00PPcs NFhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690440988; x=1691045788; h=content-transfer-encoding:to:message-id:thread-topic:subject:from :date:mime-version:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L7m5UAVlpA3q+K/xzXQQB9owxJ7rKEUug4xJI7RkhvY=; b=K86U4UHq/yaha11RLTaG3ruEgculVrO64Q5fXQl0CEfSbxeDOqaqtxR9FI/ssmhbFc 6YQ7/dMCTPZl1b0McXHQGHRwhib/UpecdQsGaA2uasv9pT3xiRRN+TnBU1EJpTYeNpZO S2+m9xIyltgrErMesJ6rNVxsH+jDhbxDn5fGk/LxH5BpPPa7vM4rLZ9FGYQmSGyg5o81 0LOysSX0ZAbj5Tr0BAqxXDxu2itKybPWhSeI8NiNCgjjW1g6itVWV24qXd+EjBnq7jtP MymQMJMbB+0E2pe627TlzLGC90ZoVHa9ApA+63vtE6tZDj/4PWyBMBNEsLHpADliaZ41 X9QQ== X-Gm-Message-State: ABy/qLbKBt5G55KPlR6IH2PCcHZWhHxAet6rF3d2abyu3qwYOwAAXoLQ PvSLIoXPoPEoOU756YDsmIa/5D5QlF8= X-Google-Smtp-Source: APBJJlFyW/hi1f8od+etTYnapiE9FFGm+92TjqwxKdaHJehtsrWuWGkfeeMiyA6vbNHCgog/3D45kw== X-Received: by 2002:a17:902:694c:b0:1bb:c7c6:3454 with SMTP id k12-20020a170902694c00b001bbc7c63454mr3414814plt.48.1690440988289; Wed, 26 Jul 2023 23:56:28 -0700 (PDT) Received: from DESKTOP-CTNLMV4 ([133.9.41.40]) by smtp.gmail.com with ESMTPSA id jn13-20020a170903050d00b001b80ed7b66fsm763237plb.94.2023.07.26.23.56.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2023 23:56:27 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 27 Jul 2023 15:56:20 +0900 From: YI YUE Subject: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct Thread-Topic: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct Message-ID: <28F396EB-23A9-4960-BF31-A452AFD33508@hxcore.ol> To: "bug-gnu-emacs@gnu.org" Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=includeyy123@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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: Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (includeyy123[at]gmail.com) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (includeyy123[at]gmail.com) 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 27 Jul 2023 03:05:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/)

I not= iced that in jsonrpc.el, the function `jsonrpc-error' will singal a `jsonrp= c-error' error

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

<= o:p> 

Here is the original code starts a= t jsonrpc.el line 224:

 

(signal 'jsonrpc-error

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(,msg

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (jsonrpc-error-code . ,32603)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (jsonrpc-error-message= . ,msg)))

 

I think it should be:

 

(signal 'jsonrpc-error

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(,msg

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (jsonrpc-error-code . -32603)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (jsonrpc-error-message= . ,msg)))

 

Regards.

 

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

= From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 28 02:57:12 2023 Received: (at 64888) by debbugs.gnu.org; 28 Jul 2023 06:57:12 +0000 Received: from localhost ([127.0.0.1]:43533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPHPT-0007FD-QV for submit@debbugs.gnu.org; Fri, 28 Jul 2023 02:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPHPR-0007F0-Se for 64888@debbugs.gnu.org; Fri, 28 Jul 2023 02:57:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPHPM-0004Wb-Lh; Fri, 28 Jul 2023 02:57:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=VhjfSU5QDbWTzW2vFn/Q4d1owiZRFZIK9w1XncKUg6E=; b=eRLMKp6JJ6LxbRHZBNtM 8VmLjKmlrfaaXaR+qM111ftyjEYNoVHuwqSCyJj/OJvb8rao0xa7CB3eQulmz61/BosT7MdxTDN6S rtUCQS4pSr4zgG6VVYoIYW+YEX3pcpxrV5/cYr3PuGZcf2YnC+AOkUqolLei6wsvEfW/jkA+N4LBR 2glP/3F1rZQrJpoSzADHJwelWZirsxwmlCyM2zovhmN6tQjemhqO3LhnX024xLwUYFbFTzKK7b7lJ 72zdidF95Niv/UHIrr7PVk1WYPIsz5I5eP0lbff66wrzkM441kZNzn8Mpx/THlpzuavJ8Ot1TpZ1b ss76La7nTnWjHQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPHPM-0000XK-1I; Fri, 28 Jul 2023 02:57:04 -0400 Date: Fri, 28 Jul 2023 09:57:56 +0300 Message-Id: <83tttojzez.fsf@gnu.org> From: Eli Zaretskii To: YI YUE , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <28F396EB-23A9-4960-BF31-A452AFD33508@hxcore.ol> (message from YI YUE on Thu, 27 Jul 2023 15:56:20 +0900) Subject: Re: bug#64888: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct References: <28F396EB-23A9-4960-BF31-A452AFD33508@hxcore.ol> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64888 Cc: 64888@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 27 Jul 2023 15:56:20 +0900 > From: YI YUE > > 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 João, any comments? It looks like a simple typo to me, or am I missing something? From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 28 04:22:26 2023 Received: (at 64888) by debbugs.gnu.org; 28 Jul 2023 08:22:26 +0000 Received: from localhost ([127.0.0.1]:43586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIjy-0003xL-FN for submit@debbugs.gnu.org; Fri, 28 Jul 2023 04:22:26 -0400 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]:42048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPIjv-0003wx-Gu for 64888@debbugs.gnu.org; Fri, 28 Jul 2023 04:22:25 -0400 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-56c440ad9c4so1161112eaf.0 for <64888@debbugs.gnu.org>; Fri, 28 Jul 2023 01:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690532538; x=1691137338; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=J9OoPkfto4mgKoBuzAXNIDu9zSZPeJN9z41PqgyyWSk=; b=h8bDeLKYoH5LKk7na7JUmtliR7R11FxRwezS7U1MDTYLRR0M3neTl93ybc2O9PjZKV tJRd8nk8T2e2m93azJbBBp33pBo+pSI9ycbAxVmwNpZxH03kp1As9I72Nb3dpHt3WlQi NcaZV5PP3IzFlsUCwx1QPou1mgfyFP6FyPOIwLGNHmY42W9XgoO6Gk4/XmJL0cALY0bv nj3JVtxGG5v29TdFRUMPO9udgHh7v7l/g+1bKxipM7TqAuuZBcfqFkcrq9AVy7eSzWhW 7zN0zFKgEDanu05IaN3X4YO26dqB3Nd6JRtNPWnI7ucBQhqN3qRYrYGgEW4zIoUntYI9 MeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690532538; x=1691137338; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J9OoPkfto4mgKoBuzAXNIDu9zSZPeJN9z41PqgyyWSk=; b=JmOvOZhTfzkXfdcklENzm5lHdgdNWRWBFghHXQYlyXyeyBCn2nnqM5rxE1ZJ+q8gSF 8vTcclHDrZcL+DE95lJg0Bqy+g99mpr2xCY6fmxIlz7orB+VX6YJc96wnUoCa5cUIRlI Lt5LsQ59V8fDK2yByc1JODVrtVrTuhSwq9bzRA4LCFSZ8LOTRXfbNweaTQ2rWz3MmUiQ Nt0Z+ETKbKpLz6lUBgNzGgRnr3CDKMFbaEnAeml1M+rOHpOlY4jTvsoCHeIoTQuWmN+h j/Dgdg7AlARo3H6L/RbC7tJsLuyC3EV5JlxFO6nZvpceBQs0Yd2XW5PFYWJR0tyTlfYS RPIA== X-Gm-Message-State: ABy/qLZnFkpoPEh8Ka0Y/3CL5/ToDPGfNKFQTRCdr2JOgu4Bn1Tyxkoc qyYmhLSsDS1L5B8bPRC7nuJfAJA6ms47zXz4w2M= X-Google-Smtp-Source: APBJJlHHPCkQLyUO9qXh7oHWFormFmBK5qUDiTIlYegr4Wzze0V4ArwhL8wT9FHbsW74aH1kXFztuec5RePQ7JK2nyo= X-Received: by 2002:a4a:344a:0:b0:56c:43ce:ac08 with SMTP id n10-20020a4a344a000000b0056c43ceac08mr1623525oof.1.1690532537811; Fri, 28 Jul 2023 01:22:17 -0700 (PDT) MIME-Version: 1.0 References: <28F396EB-23A9-4960-BF31-A452AFD33508@hxcore.ol> <83tttojzez.fsf@gnu.org> In-Reply-To: <83tttojzez.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Fri, 28 Jul 2023 09:24:45 +0100 Message-ID: Subject: Re: bug#64888: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64888 Cc: 64888@debbugs.gnu.org, YI YUE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Jul 28, 2023 at 7:57=E2=80=AFAM Eli Zaretskii wrote: > > > Date: Thu, 27 Jul 2023 15:56:20 +0900 > > From: YI YUE > > > > 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 > > Jo=C3=A3o, any comments? It looks like a simple typo to me, or am I > missing something? Yes, it's a typo and an outright bug, according to the docstring, which is correct. When an Elisp JSONRPC endpoint request handler explicitly signals an error with the jsonrpc-error function, the mistaken recorded code is sent over the wire to the other endpoint. When it signals any other error (more common), the correct -32603 is sent. So this erroneous code is not displayed to the user (unless debug-on-error is on) nor is it something that the jsonrpc.el client application can reasonably consume and hypothetically need to be bug-compatible with. However, other arbitrary JSONRPC endpoints (outside of Emacs) may theoretically have grown some expectation of the bugged value it they're only ever talking to jsonrpc.el backed endpoints. But I've never seen this and I don't think this is too likely. So I'd say we should probably fix this without too much worry. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 29 06:14:09 2023 Received: (at 64888-done) by debbugs.gnu.org; 29 Jul 2023 10:14:09 +0000 Received: from localhost ([127.0.0.1]:46460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPgxd-0005U2-9z for submit@debbugs.gnu.org; Sat, 29 Jul 2023 06:14:09 -0400 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]:61744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPgxb-0005Te-ER for 64888-done@debbugs.gnu.org; Sat, 29 Jul 2023 06:14:07 -0400 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-56c74961e0cso813799eaf.3 for <64888-done@debbugs.gnu.org>; Sat, 29 Jul 2023 03:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690625641; x=1691230441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TPkkEnCKrSj1tfFNTn6WkHRgDn6NrMJ/dHgqkwmHe2w=; b=rBwDRLMSAg4ObqACZDD0lXYD8efYd1OYJA6FL1rSmxSzl6ptWsmysjo5L28qcubckM Iqik9t141SvLjeUhHx1sdErrO6V0nGZdVJtfooUF+Sfpilmc+KMyVdujcN7jg/B7L+8J V5Pplz4YOI3ukXfu4FDr3jCHILb1K3K9xxDu825Sd2PqkNVBJCXH6tI5eWPy18Ug/rYO 2Hn9zGShvw12Bsq443I5vbl3c4I7kUM9UzhkzRx+/Zal8J02IiRC20ATyD/OcmC8Nt7d /b8CEQ5ETGyEV4VX5V8aRi6gt9W9vrOXbIg4mtQNEFGEvZIzQ01uPm5phQwTaC/ImlIx pGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690625641; x=1691230441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TPkkEnCKrSj1tfFNTn6WkHRgDn6NrMJ/dHgqkwmHe2w=; b=JZQovXpZPKaqMywXDTrQuvwUkrvd0XcmZy3LpgoVJuLkl17nx0Zu+XqaVLQukwrPVu Aq1c838XbPRli0Op3TFN8X8mzT1sfQbH0zqYELmtenoiLxkoJ/aMGY5SH/jIlKwJeMqV gv4FGT/oK+wrqUIeC7DL5ePmtX2I1XWHRFnW6V5xu8RCByXbSZrPoFV9tFM9juRAT+Sq WYgo1TqJBpT+fLUPKNd9hkYE3wEiGmrZnRRDCqNu40xqcDlFo1vm5aGRafQoZfMjehA2 1rN2xxgKsYiDWvt+mb/7EJUIJZ2w+PmIVZnuC5vP7VR30mKZAMoKbN6bFO9oJ9/8lPIv ELrw== X-Gm-Message-State: ABy/qLYOPa7JJRBx7hd/Nzn75j5pR21A4nXVS4oJU6SHUiydIbHLbiUG sOVkqrNf+3Y8Fl/5gvd4OxLzplv5A0X7viZbxnc= X-Google-Smtp-Source: APBJJlE93Gn5j/noFfeatPK8YFi+YTQ31JufcIrvyNn9/9UrEqIWb1yTVxbM+6BlR5JoebGZWV2Fqi0ra1Bvktf3qtA= X-Received: by 2002:a4a:2a49:0:b0:565:83d1:e3cc with SMTP id x9-20020a4a2a49000000b0056583d1e3ccmr4589718oox.2.1690625641597; Sat, 29 Jul 2023 03:14:01 -0700 (PDT) MIME-Version: 1.0 References: <28F396EB-23A9-4960-BF31-A452AFD33508@hxcore.ol> <83tttojzez.fsf@gnu.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sat, 29 Jul 2023 11:16:29 +0100 Message-ID: Subject: Re: bug#64888: 28.2; jsonrpc.el; Function jsonrpc-error's error code is not correct To: Eli Zaretskii , 64888-done@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64888-done Cc: YI YUE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I've fixed this in master, commit 2af83f215ce83eda5a3eba21c352e6cd7435fbb1. Closing. On Fri, Jul 28, 2023 at 9:24=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > > On Fri, Jul 28, 2023 at 7:57=E2=80=AFAM Eli Zaretskii wrot= e: > > > > > Date: Thu, 27 Jul 2023 15:56:20 +0900 > > > From: YI YUE > > > > > > I noticed that in jsonrpc.el, the function `jsonrpc-error' will singa= l a > > > `jsonrpc-error' error > > > > > > with error code 32603, but in JSON-RPC 2.0 Specification[1], the erro= r code is > > > -32603 > > > > Jo=C3=A3o, any comments? It looks like a simple typo to me, or am I > > missing something? > > Yes, it's a typo and an outright bug, according to the docstring, > which is correct. > > When an Elisp JSONRPC endpoint request handler explicitly signals an > error with the jsonrpc-error function, the mistaken recorded > code is sent over the wire to the other endpoint. When it signals > any other error (more common), the correct -32603 is sent. > > So this erroneous code is not displayed to the user > (unless debug-on-error is on) nor is it something > that the jsonrpc.el client application can reasonably consume > and hypothetically need to be bug-compatible with. > > However, other arbitrary JSONRPC endpoints (outside of Emacs) > may theoretically have grown some expectation of the bugged value > it they're only ever talking to jsonrpc.el backed endpoints. > But I've never seen this and I don't think this is too likely. > > So I'd say we should probably fix this without too much worry. > > Jo=C3=A3o --=20 Jo=C3=A3o T=C3=A1vora From unknown Wed Jun 18 23:12:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Aug 2023 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator