aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-comments
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-04-24 17:42:03 +0100
committerStruan Donald <struan@exo.org.uk>2018-04-26 13:53:27 +0100
commitb002374a885736b7436fc1c3132e50b6a1f8bdf9 (patch)
tree6148cdcd85ae7a538dd4e1092f21a39994492454 /bin/send-comments
parent3806b6b39ace2d38c264615eb95370a303ede34c (diff)
[Open311] warn about send-comments errors if verbose flag set
Previously send-comments errors would only be printed the first time they occurred so there was no visibility of ongoing errors. This brings send-comments in line with send-reports by emitting errors if the script is called with --verbose. Fixes #2091
Diffstat (limited to 'bin/send-comments')
-rwxr-xr-xbin/send-comments6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/send-comments b/bin/send-comments
index 333bc2a00..ce4318f71 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -153,8 +153,12 @@ while ( my $body = $bodies->next ) {
$comment->update( {
send_fail_count => $comment->send_fail_count + 1,
send_fail_timestamp => \'current_timestamp',
- send_fail_reason => 'Failed to post over Open311',
+ send_fail_reason => "Failed to post over Open311\n\n" . $o->error,
} );
+
+ if ( $verbose && $o->error ) {
+ warn $o->error;
+ }
}
}
}