MXS-1300: Improve MaxCtrl HTTP error messages

The messages now show where the request failed and what was
requested. This should help resolve both develper and end-user problems.

Also fixed the missing logging of the output string in the `parse`
callback of the main function and cleaned up the POSTed server body.
This commit is contained in:
Markus Mäkelä
2017-08-04 14:03:55 +03:00
parent 8f7be8a4f3
commit db531fb2e2
3 changed files with 15 additions and 5 deletions

View File

@ -100,7 +100,9 @@ module.exports.execute = function(argv, opts) {
program
.parse(argv, {resolve: resolve, reject: reject}, function(err, argv, output) {
if (err) {
reject(err)
reject(err.message)
} else if (output) {
logger.log(output)
}
})
})