Subject: | |
Date: | Fri, 21 Feb 2014 16:51:18 -0500 |
To: | bug-JSON-RPC [...] rt.cpan.org |
From: | Patrick Palmieri <patrick.palmieri2 [...] gmail.com> |
Hello,
When the JSON-RPC HTTP server reports any error, the result is always
undef. This is not very usefull if you need to see the error message
that is returned from the server.
This can be fixed by either removing the if that checks is_sucess, or by
adding "JSON::RPC::ReturnObject->new($result, $self->json);" to the else
return.
example output
$VAR1 = bless( {
'version' => 0,
'content' => {
'error' => {
'message' => 'Block not
found',
'code' => -5
},
'id' => undef,
'result' => undef
},
'jsontext' =>
'{"result":null,"error":{"code":-5,"message":"Block not
found"},"id":null}
',
'is_success' => 0
}, 'JSON::RPC::ReturnObject' );