summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-05-30 05:39:09 +0200
committerByron Jones <bjones@mozilla.com>2012-05-30 05:39:09 +0200
commitce8f837dcd1ccd23cd5f63f258efd257e3de70f3 (patch)
tree0eeb9a64decd827d7446d7f940d69fc744c02389 /Bugzilla
parent3c0e14b226413de856d198251aff4284e71d229a (diff)
downloadbugzilla-ce8f837dcd1ccd23cd5f63f258efd257e3de70f3.tar.gz
bugzilla-ce8f837dcd1ccd23cd5f63f258efd257e3de70f3.tar.xz
Bug 759093: don't report most webservice errors to arecibo
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Arecibo.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Bugzilla/Arecibo.pm b/Bugzilla/Arecibo.pm
index 3e1df3156..974594b72 100644
--- a/Bugzilla/Arecibo.pm
+++ b/Bugzilla/Arecibo.pm
@@ -27,6 +27,7 @@ use Sys::Hostname;
use Bugzilla::Constants;
use Bugzilla::Util;
+use Bugzilla::WebService::Constants;
use constant CONFIG => {
# 'types' maps from the error message to types and priorities
@@ -127,8 +128,21 @@ sub arecibo_handle_error {
# don't send to arecibo unless configured
my $arecibo_server = Bugzilla->params->{arecibo_server} || '';
my $send_to_arecibo = $arecibo_server ne '';
+
+ # web service filtering
+ if ($send_to_arecibo
+ && (Bugzilla->error_mode == ERROR_MODE_DIE_SOAP_FAULT || Bugzilla->error_mode == ERROR_MODE_JSON_RPC))
+ {
+ my ($code) = $message =~ /^(-?\d+): /;
+ if ($code
+ && !($code == ERROR_UNKNOWN_FATAL || $code == ERROR_UNKNOWN_TRANSIENT))
+ {
+ $send_to_arecibo = 0;
+ }
+ }
+
+ # message content filtering
if ($send_to_arecibo) {
- # message content filtering
foreach my $re (@{CONFIG->{ignore}}) {
if ($message =~ $re) {
$send_to_arecibo = 0;