Skip to content

Commit

Permalink
try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Nov 26, 2024
1 parent f6840c8 commit 7d0f136
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api_tests/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ async function allowInstance(api: LemmyHttp, instance: string) {
allow: true,
reason: undefined,
};
await api.adminAllowInstance(params);
// Ignore errors from duplicate allows (because setup gets called for each test file)
try {
await api.adminAllowInstance(params);
} catch {}
}

export async function createPost(
Expand Down

0 comments on commit 7d0f136

Please sign in to comment.