mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-15 20:04:29 +08:00
impr(result saving): better error message when result schema is incorrect
this should reduce confusion, especially when deploying updates
This commit is contained in:
parent
468460fc27
commit
cd11d7ced7
1 changed files with 4 additions and 0 deletions
|
|
@ -1142,6 +1142,10 @@ async function saveResult(
|
|||
response.message =
|
||||
"Old key data format. Please refresh the page to download the new update. If the problem persists, please contact support.";
|
||||
}
|
||||
if (/"result\..+" is (not allowed|required)/gi.test(response.message)) {
|
||||
response.message =
|
||||
"Looks like your result data is using an incorrect schema. Please refresh the page to download the new update. If the problem persists, please contact support.";
|
||||
}
|
||||
return Notifications.add("Failed to save result: " + response.message, -1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue