diff --git a/src/index.ts b/src/index.ts index 462f18a..2a17c07 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-throw-literal */ import type { Span, StartSpanOptions } from "@sentry/types"; import merge from "deepmerge"; import logLevel, { levels, LogLevelDesc } from "loglevel"; @@ -14,6 +13,7 @@ export interface CustomOptions { logTracingHeader?: boolean; } +// eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface Data {} let apiKey = "torus-default"; @@ -71,7 +71,9 @@ async function fetchAndTrace(url: string, init: RequestInit): Promise let _url: URL | null = null; try { _url = new URL(url); - } catch (error) {} + } catch { + // ignore + } if (sentry && _url && (tracingOrigins.includes(_url.origin) || tracingPaths.includes(_url.pathname))) { const result = await sentry.startSpan>( { diff --git a/test.mjs b/test.mjs deleted file mode 100644 index d109c12..0000000 --- a/test.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import * as Sentry from "@sentry/node"; - -import { get, enableSentryTracing } from "./dist/lib.cjs/index.js"; - -new Sentry.init({ - dsn: 'add_sentry_dsn_here', -}) - -enableSentryTracing(Sentry, [], []); - - -const getData = async () => { - const data = await get("https://api-passwordless.web3auth.io/api/v3/auth/health"); - console.log(data); - throw new Error("Test Error"); -} - -getData(); \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index 9a1e9ae..197043c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-unresolved import { defineConfig } from "vitest/config"; export default defineConfig({