mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
not allowing user to retry saving result in certain cases
This commit is contained in:
parent
9e7e0fc6ff
commit
1a47e6b799
1 changed files with 8 additions and 5 deletions
|
|
@ -1683,12 +1683,15 @@ async function saveResult(
|
|||
Result.hideCrown();
|
||||
|
||||
if (response.status !== 200) {
|
||||
console.log("Error saving result", completedEvent);
|
||||
retrySaving.canRetry = true;
|
||||
$("#retrySavingResultButton").removeClass("hidden");
|
||||
if (!isRetrying) {
|
||||
retrySaving.completedEvent = completedEvent;
|
||||
//only allow retry if status is not in this list
|
||||
if (![460, 461, 463, 464, 465].includes(response.status)) {
|
||||
retrySaving.canRetry = true;
|
||||
$("#retrySavingResultButton").removeClass("hidden");
|
||||
if (!isRetrying) {
|
||||
retrySaving.completedEvent = completedEvent;
|
||||
}
|
||||
}
|
||||
console.log("Error saving result", completedEvent);
|
||||
return Notifications.add("Failed to save result: " + response.message, -1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue