Commit b0edd0ea authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 553913: Add explicit error codes to WebService errors that were missing

them r=dkl, a=mkanat
parent b32a0b43
...@@ -1923,6 +1923,11 @@ A hash with one element, C<id> whose value is the id of the newly-created commen ...@@ -1923,6 +1923,11 @@ A hash with one element, C<id> whose value is the id of the newly-created commen
=over =over
=item 54 (Hours Worked Too Large)
You specified a C<work_time> larger than the maximum allowed value of
C<99999.99>.
=item 100 (Invalid Bug Alias) =item 100 (Invalid Bug Alias)
If you specified an alias and either: (a) the Bugzilla you're querying If you specified an alias and either: (a) the Bugzilla you're querying
...@@ -1940,6 +1945,11 @@ You did not have the necessary rights to edit the bug. ...@@ -1940,6 +1945,11 @@ You did not have the necessary rights to edit the bug.
You tried to add a private comment, but don't have the necessary rights. You tried to add a private comment, but don't have the necessary rights.
=item 114 (Comment Too Long)
You tried to add a comment longer than the maximum allowed length
(65,535 characters).
=back =back
=item B<History> =item B<History>
...@@ -1957,6 +1967,9 @@ but can't, in Bugzilla B<3.4>. ...@@ -1957,6 +1967,9 @@ but can't, in Bugzilla B<3.4>.
C<private>, and you can still call it C<private> for backwards-compatibility C<private>, and you can still call it C<private> for backwards-compatibility
purposes if you wish. purposes if you wish.
=item Before Bugzilla B<3.6>, error 54 and error 114 had a generic error
code of 32000.
=back =back
=back =back
...@@ -2055,6 +2068,11 @@ You did not have the necessary rights to edit the bug. ...@@ -2055,6 +2068,11 @@ You did not have the necessary rights to edit the bug.
One of the URLs you provided did not look like a valid bug URL. One of the URLs you provided did not look like a valid bug URL.
=item 115 (See Also Edit Denied)
You did not have the necessary rights to edit the See Also field for
this bug.
=back =back
=item B<History> =item B<History>
...@@ -2063,6 +2081,8 @@ One of the URLs you provided did not look like a valid bug URL. ...@@ -2063,6 +2081,8 @@ One of the URLs you provided did not look like a valid bug URL.
=item Added in Bugzilla B<3.4>. =item Added in Bugzilla B<3.4>.
=item Before Bugzilla B<3.6>, error 115 had a generic error code of 32000.
=back =back
=back =back
......
...@@ -53,8 +53,9 @@ use constant WS_ERROR_CODE => { ...@@ -53,8 +53,9 @@ use constant WS_ERROR_CODE => {
params_required => 50, params_required => 50,
object_does_not_exist => 51, object_does_not_exist => 51,
param_must_be_numeric => 52, param_must_be_numeric => 52,
xmlrpc_invalid_value => 52, number_not_numeric => 52,
param_invalid => 53, param_invalid => 53,
number_too_large => 54,
# Bug errors usually occupy the 100-200 range. # Bug errors usually occupy the 100-200 range.
improper_bug_id_field_value => 100, improper_bug_id_field_value => 100,
bug_id_does_not_exist => 101, bug_id_does_not_exist => 101,
...@@ -85,11 +86,15 @@ use constant WS_ERROR_CODE => { ...@@ -85,11 +86,15 @@ use constant WS_ERROR_CODE => {
# Comment-related errors # Comment-related errors
comment_is_private => 110, comment_is_private => 110,
comment_id_invalid => 111, comment_id_invalid => 111,
comment_too_long => 114,
# See Also errors # See Also errors
bug_url_invalid => 112, bug_url_invalid => 112,
bug_url_too_long => 112, bug_url_too_long => 112,
# Insidergroup Errors # Insidergroup Errors
user_not_insider => 113, user_not_insider => 113,
# Note: 114 is above in the Comment-related section.
# Bug update errors
illegal_change => 115,
# Authentication errors are usually 300-400. # Authentication errors are usually 300-400.
invalid_username_or_password => 300, invalid_username_or_password => 300,
...@@ -114,7 +119,10 @@ use constant WS_ERROR_CODE => { ...@@ -114,7 +119,10 @@ use constant WS_ERROR_CODE => {
invalid_user_group => 504, invalid_user_group => 504,
user_access_by_id_denied => 505, user_access_by_id_denied => 505,
user_access_by_match_denied => 505, user_access_by_match_denied => 505,
# Fatal errors (must be negative).
# RPC Server Errors. See the following URL:
# http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
xmlrpc_invalid_value => -32600,
unknown_method => -32601, unknown_method => -32601,
}; };
......
...@@ -297,7 +297,8 @@ ...@@ -297,7 +297,8 @@
[% ELSIF error == "comment_too_long" %] [% ELSIF error == "comment_too_long" %]
[% title = "Comment Too Long" %] [% title = "Comment Too Long" %]
Comments cannot be longer than 65,535 characters. Comments cannot be longer than
[%+ constants.MAX_COMMENT_LENGTH FILTER html %] characters.
[% ELSIF error == "auth_classification_not_enabled" %] [% ELSIF error == "auth_classification_not_enabled" %]
[% title = "Classification Not Enabled" %] [% title = "Classification Not Enabled" %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment