# comment that it was retired. Also, if an error changes its name, you'll
# have to fix it here.
use constant WS_ERROR_CODE => {
+ # Generic Bugzilla::Object errors are 50-99.
+ param_required => 50,
# Bug errors usually occupy the 100-200 range.
invalid_bug_id_or_alias => 100,
invalid_bug_id_non_existent => 101,
sub login {
my ($self, $params) = @_;
my $remember = $params->{remember};
-
+
+ # Username and password params are required
+ foreach my $param ("login", "password") {
+ defined $params->{$param}
+ || ThrowCodeError('param_required', { param => $param });
+ }
+
# Convert $remember from a boolean 0/1 value to a CGI-compatible one.
if (defined($remember)) {
$remember = $remember? 'on': '';
The account has been disabled. A reason may be specified with the
error.
+=item 50 (Param Required)
+
+A login or password parameter was not provided.
+
=back
=back