commit | 6dec85b5e80dc13b6a4b8909e0933e6f2c0b99ec | [log] [tgz] |
---|---|---|
author | Nils Diewald <nils@diewald-online.de> | Fri Jul 18 18:43:29 2014 +0000 |
committer | Nils Diewald <nils@diewald-online.de> | Fri Jul 18 18:43:29 2014 +0000 |
tree | 83ea5c46832c4e10f52e107570b02cf5e4564447 | |
parent | c6d1f47943a1fc21fcf83878dcb5ce816f5702a8 [diff] |
Fixed error message display
diff --git a/lib/Korap/Plugin/KorapSearch.pm b/lib/Korap/Plugin/KorapSearch.pm index d42ae61..9d95026 100644 --- a/lib/Korap/Plugin/KorapSearch.pm +++ b/lib/Korap/Plugin/KorapSearch.pm
@@ -137,7 +137,8 @@ my $tx = $ua->get($url); if (my $e = $tx->error) { - $c->notify(error => $e->{code} . ': ' . $e->{message} . ' (remote)'); + $c->notify(error => ($e->{code} ? $e->{code} . ': ' : '') . + $e->{message} . ' (remote)'); return; };