initGame() try catch
This commit is contained in:
@@ -59,7 +59,7 @@
|
|||||||
optionsAreNotSet = false;
|
optionsAreNotSet = false;
|
||||||
showWaitPage = true;
|
showWaitPage = true;
|
||||||
const matchOptions = pong.computeMatchOptions(options);
|
const matchOptions = pong.computeMatchOptions(options);
|
||||||
|
try {
|
||||||
const response = await fetch(`http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/game/ticket`, {
|
const response = await fetch(`http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/game/ticket`, {
|
||||||
method : "POST",
|
method : "POST",
|
||||||
headers : {'Content-Type': 'application/json'},
|
headers : {'Content-Type': 'application/json'},
|
||||||
@@ -93,6 +93,9 @@
|
|||||||
errorMessage = "";
|
errorMessage = "";
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const initGameForInvitedPlayer = async(invitation : any) =>
|
const initGameForInvitedPlayer = async(invitation : any) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user