initGame() try catch

This commit is contained in:
LuckyLaszlo
2023-01-09 07:17:16 +01:00
parent 42e3e148b4
commit 2ae0ee043a

View File

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