From cd11d7ced70d8ab6fab3b117599652aacd565cf3 Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 28 May 2024 13:43:01 +0200 Subject: [PATCH] impr(result saving): better error message when result schema is incorrect this should reduce confusion, especially when deploying updates --- frontend/src/ts/test/test-logic.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 26e2744e4..9c805031a 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -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); }