Bug#1082651: libjson-rpc-perl: Do not try to parse non-existing JSON
Guillem Jover
guillem at debian.org
Tue Sep 24 04:44:55 BST 2024
Source: libjson-rpc-perl
Source-Version: 1.06-3
Severity: wishlist
Tags: patch upstream
Hi!
When running the kgb-client (from kgb-bot), if the server returns an
error, then the JSON::RPC::Legacy::Client module will try to parse a
non-existent JSON reply, which then ends up as a truncated and confusing
error message, such as:
remote: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Can't connect to kgb...") at /usr/share/perl5/JSON/RPC/Legacy/Client.pm line 186.
remote: Unable to relay message. All servers failed
With the attached patch, the error message is instead something like:
remote: Transport error: 500 Can't connect to kgb.tina.pm:9418 (Network is unreachable)
remote: Unable to relay message. All servers failed
I think this would fix the kgb-bot bug #798813.
Thanks,
Guillem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-JSON-RPC-Legacy-Client-Do-not-try-to-parse-non-exist.patch
Type: text/x-diff
Size: 983 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20240924/3a054c21/attachment.patch>
More information about the pkg-perl-maintainers
mailing list