MXS-1929: Improve JSON type error messages
If an invalid value or type is given to the REST API, having the expected type as well as the given type make problem resolution easier. Also added a value check into MaxCtrl for listener ports.
This commit is contained in:
@ -222,6 +222,10 @@ exports.builder = function(yargs) {
|
||||
.usage('Usage: create listener <service> <name> <port>')
|
||||
}, function(argv) {
|
||||
|
||||
if (!Number.isInteger(argv.port)) {
|
||||
throw "'" + argv.port + "' is not a valid value for port"
|
||||
}
|
||||
|
||||
var listener = {
|
||||
'data': {
|
||||
'id': argv.name,
|
||||
|
||||
Reference in New Issue
Block a user