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

Function captureError

apps/api/src/config/sentry/sentry.ts:53–71  ·  view source on GitHub ↗
(
  error: unknown,
  context?: Record<string, unknown>
)

Source from the content-addressed store, hash-verified

51 * enqueues to the in-memory transport.
52 */
53export const captureError = async (
54 error: unknown,
55 context?: Record<string, unknown>
56): Promise<void> => {
57 if (env.SENTRY_DSN === "") {
58 return;
59 }
60
61 Sentry.captureException(
62 error,
63 context !== undefined ? { extra: context } : undefined
64 );
65
66 try {
67 await Sentry.flush(SENTRY_FLUSH_TIMEOUT_MS);
68 } catch {
69 /* swallowed: flush failure shouldn't take down a fatal-handler path. */
70 }
71};

Callers 1

setupGlobalErrorHandlersFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected