-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more details in warnings #16
base: master
Are you sure you want to change the base?
Conversation
@@ -144,7 +144,12 @@ sub call_rpc { | |||
|
|||
my $api_response; | |||
if (!$res) { | |||
warn "WrongResponse [$msg_type]"; | |||
my $tx = $client->tx; | |||
my $details = 'URL: ' . $tx->req->url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this check if tx
object exists, like my $details = $tx ? 'URL: ' . $tx->req->url : '';
else it will give warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for paying attention to that!
According to the implementation of MojoX::JSON::RPC::Client
we shouldn't:
-
$callback
is invoked at https://metacpan.org/source/HENRYYKT/MojoX-JSON-RPC-0.10/lib/MojoX/JSON/RPC/Client.pm#L47 after doing_process_result
-
in
_process_result
it already assumes$tx
is defined https://metacpan.org/source/HENRYYKT/MojoX-JSON-RPC-0.10/lib/MojoX/JSON/RPC/Client.pm#L104 . I.e. if it will be undefined, it willdie
in non-our code already.
@basiliscos failing tests |
Tests fail in master too, because |
No description provided.