Merge pull request #25 from bearcanrun/develop
Update TeamSetup: ContainerAlreadyExists error handling
This commit is contained in:
1 file changed
+5
-5
@@ -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 {
|
||||
|
||||
|
||||
Reference in new issue
Block a user