Skip to content

Commit 857dbbc

Browse files
committed
fix: get replay errors from the right place
UI updates to show support actions for unreported accounts wasn't showing, because the web client was looking for the rejection notice in the wrong place.
1 parent 170f414 commit 857dbbc

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

clients/web/src/lib/components/molecules/scrims/AdminSubmissionTable/SubmissionDetailModal.svelte

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
$: {
2626
unreportedAccounts = [];
2727
verifiedPlayers = [];
28+
let found = false;
29+
2830
if (submission.items) {
2931
for (const item of submission.items) {
3032
if (item.progress?.error) {
@@ -34,12 +36,27 @@
3436
const data = JSON.parse(match[1]);
3537
if (data.unreported) unreportedAccounts = data.unreported;
3638
if (data.verified) verifiedPlayers = data.verified;
39+
found = true;
3740
break;
38-
} catch (e) { console.error(e) }
41+
} catch (e) { console.error(e); }
3942
}
4043
}
4144
}
4245
}
46+
47+
if (!found && submission.rejections) {
48+
for (const rejection of submission.rejections) {
49+
const match = rejection.reason.match(/RawData: (\{.*\})/);
50+
if (match) {
51+
try {
52+
const data = JSON.parse(match[1]);
53+
if (data.unreported) unreportedAccounts = data.unreported;
54+
if (data.verified) verifiedPlayers = data.verified;
55+
break;
56+
} catch (e) { console.error(e); }
57+
}
58+
}
59+
}
4360
}
4461
4562
let linkingAccount: UnreportedAccount | null = null;

0 commit comments

Comments
 (0)