Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Fix error message for failed pingbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Mar 11, 2016
1 parent 9edbb68 commit ceddf59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/App/txtnix/Plugin/LinkBack.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ sub linkback {
}
else {
my $prefix = "Couldn't ping back to $url";
my $err = $tx->error;
warn $err
? "$prefix: $err->{code} response: $err->{message}\n"
: "$prefix: Connection error: $err->{message}\n";
if ( my $err = $tx->error ) {
warn $err->{code}
? "$prefix: $err->{code} response: $err->{message}\n"
: "$prefix: Connection error: $err->{message}\n";
}
}
$end->();
}
Expand Down

0 comments on commit ceddf59

Please sign in to comment.