Merge pull request #25 from bearcanrun/develop

Update TeamSetup: ContainerAlreadyExists error handling
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2018-10-23 10:44:53 +02:00
commit 0fb9bfebf1
1 file changed
+5 -5
+5 -5
View File
@@ -18,7 +18,7 @@
}
function newTeam(pTeamCodeName, pTeamDisplayName, pUserName, pBotCodeName, pBotDisplayName, pAuthId, callBackFunction) {
try {
if (CONSOLE_LOG === true) { console.log("[INFO] TeamSetup -> newTeam -> Entering function."); }
@@ -38,14 +38,14 @@
console.log("[ERROR] TeamSetup -> newTeam -> createContainer -> onContainerCreated -> Could not create the container. ");
console.log("[ERROR] TeamSetup -> newTeam -> createContainer -> onContainerCreated -> err.message = " + err.message);
if (err.code === "ContainerAlreadyExists") {
if (err.message === "ContainerAlreadyExists") {
let err = {
result: global.CUSTOM_FAIL_RESPONSE.result,
let error = {
result: err.message,
message: "Team Name already taken"
};
callBackFunction(err);
callBackFunction(error);
} else {