Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle Jam's garbage internet on mod queue loading
  • Loading branch information
regalijan committed Feb 3, 2024
1 parent 10ecf63 commit 0591478
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/routes/mod-queue.tsx
Expand Up @@ -192,9 +192,16 @@ export default function () {

if (queueType !== queue_type) setQueue(queueType);

const queueReq = await fetch(
`/api/mod-queue/list?before=${before}&showClosed=${show_closed}&type=${queueType}`,
);
let queueReq: Response;

try {
queueReq = await fetch(
`/api/mod-queue/list?before=${before}&showClosed=${show_closed}&type=${queueType}`,
);
} catch {
alert("Failed to load mod queue");
return;
}

if (!queueReq.ok) {
const errorData: { error: string } = await queueReq.json();
Expand Down

0 comments on commit 0591478

Please sign in to comment.