Skip to content

Commit

Permalink
fix: correct OPTS error code (#190)
Browse files Browse the repository at this point in the history
If an unknown option is given, the response should be 501
  • Loading branch information
trs authored Jan 7, 2020
1 parent b2b1b2a commit c59e191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/registration/opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
const [_option, ...args] = command.arg.split(' ');
const option = _.toUpper(_option);

if (!OPTIONS.hasOwnProperty(option)) return this.reply(500);
if (!OPTIONS.hasOwnProperty(option)) return this.reply(501, 'Unknown option command');
return OPTIONS[option].call(this, args);
},
syntax: '{{cmd}}',
Expand Down

0 comments on commit c59e191

Please sign in to comment.