Update grid-register.js

If register fail, print the failure details friendly to we newbee.
This commit is contained in:
lucyking
2016-03-15 14:27:20 +08:00
parent e8d41945f1
commit b4c96353a9
+3
View File
@@ -109,6 +109,9 @@ async function isAlreadyRegistered (jsonObject) {
throw new Error(`Request failed`);
}
let responseData = JSON.parse(response.body);
if (responseData.success !== true) {
logger.debug("[ERROR] " + responseData.msg); // if register fail,print the debug msg
}
return responseData.success;
} catch (err) {
logger.debug("Hub down or not responding: ${err.message}");