MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / catchError

Function catchError

apps/api/tests/api/billing/billing.utils.test.ts:18–26  ·  view source on GitHub ↗
(fn: () => unknown)

Source from the content-addressed store, hash-verified

16} from "../../helpers/db";
17
18function catchError(fn: () => unknown): unknown {
19 try {
20 fn();
21
22 return null;
23 } catch (error: unknown) {
24 return error;
25 }
26}
27
28describe("assertAllowedBillingRedirectUrl", () => {
29 test("accepts a URL whose origin matches FRONTEND_URL", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected