summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Hook.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-05-28 05:08:59 +0200
committermkanat%bugzilla.org <>2008-05-28 05:08:59 +0200
commite0db56e755e94e07677faa3729a4affe38a3ce18 (patch)
tree4aaaa2e81eca3dd0379c16982bbed3754bc59a62 /Bugzilla/Hook.pm
parent993a1c53229e174d4c2bd1d67acef6363c12db50 (diff)
downloadbugzilla-e0db56e755e94e07677faa3729a4affe38a3ce18.tar.gz
bugzilla-e0db56e755e94e07677faa3729a4affe38a3ce18.tar.xz
Bug 435507: Provide a method of hooking the WebService error codes
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 0cf566db1..820693ee0 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -262,3 +262,22 @@ WebService functions (and so that you also don't conflict with other
plugins).
=back
+
+=head2 webservice-error_codes
+
+If your webservice extension throws custom errors, you can set numeric
+codes for those errors here.
+
+Extensions should use error codes above 10000, unless they are re-using
+an already-existing error code.
+
+Params:
+
+=over
+
+=item C<error_map>
+
+A hash that maps the names of errors (like C<invalid_param>) to numbers.
+See L<Bugzilla::WebService::Constants/WS_ERROR_CODE> for an example.
+
+=back