diff options
author | Struan Donald <struan@exo.org.uk> | 2012-06-08 12:44:23 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-06-08 12:44:23 +0100 |
commit | 01b3aff830769820aca641e0841564d2c63e03d2 (patch) | |
tree | fd0772590e1818f2e8d91973bf0e06fc6d945b48 | |
parent | 27d029f2981a2ac63d07a0bab536cdd3d5fda292 (diff) | |
parent | bf94b1246c49c1ec2d2041be10176e42598d0699 (diff) |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | perllib/FixMyStreet/SendReport/Barnet.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm index 311c09318..ecbe82872 100644 --- a/perllib/FixMyStreet/SendReport/Barnet.pm +++ b/perllib/FixMyStreet/SendReport/Barnet.pm @@ -159,14 +159,16 @@ sub send { } }; - print "$err_msg\n" if $err_msg; + if ($err_msg) { + # for timeouts, we can tidy the message a wee bit (i.e. strip the 'error deserializing...' message) + $err_msg=~s/(?:Error deserializing message:.*)(Can't connect to [a-zA-Z0-9.:]+\s*\(Connection timed out\)).*/$1/s; + print "$err_msg\n"; + } if ($@) { my $e = shift; print "Caught an error: $@\n"; } if ( $return ) { - # for timeouts, we can tidy the message a wee bit (i.e. strip the 'error deserializing...' message) - $err_msg=~s/(?:Error deserializing message:.*)(Can't connect to [a-zA-Z0-9.:]+\s*\(Connection timed out\)).*/$1/s; $self->error( "Error sending to Barnet: $err_msg" ); } $self->success( !$return ); |