aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-06-08 10:33:43 +0100
committerDave Whiteland <dave@mysociety.org>2012-06-08 10:33:43 +0100
commitbf94b1246c49c1ec2d2041be10176e42598d0699 (patch)
treecf3aa2c449a2e822fbbc6d6074394b5c01c4521a /perllib
parentaabfdd765ea0217c12307a1effa3852c00eac6a4 (diff)
after overnight messages, apply Barnet timeout message tidying to the output as well as to send_fail_reason
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/SendReport/Barnet.pm8
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 );