Skip to content

Commit c59e191

Browse files
authored
fix: correct OPTS error code (#190)
If an unknown option is given, the response should be 501
1 parent b2b1b2a commit c59e191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/registration/opts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
const [_option, ...args] = command.arg.split(' ');
1414
const option = _.toUpper(_option);
1515

16-
if (!OPTIONS.hasOwnProperty(option)) return this.reply(500);
16+
if (!OPTIONS.hasOwnProperty(option)) return this.reply(501, 'Unknown option command');
1717
return OPTIONS[option].call(this, args);
1818
},
1919
syntax: '{{cmd}}',

0 commit comments

Comments
 (0)