MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / sendErrorToSentry

Function sendErrorToSentry

packages/astro/src/server/middleware.ts:46–59  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

44};
45
46function sendErrorToSentry(e: unknown): unknown {
47 // In case we have a primitive, wrap it in the equivalent wrapper class (string -> String, etc.) so that we can
48 // store a seen flag on it.
49 const objectifiedErr = objectify(e);
50
51 captureException(objectifiedErr, {
52 mechanism: {
53 type: 'auto.middleware.astro',
54 handled: false,
55 },
56 });
57
58 return objectifiedErr;
59}
60
61type AstroLocalsWithSentry = Record<string, unknown> & {
62 __sentry_wrapped__?: boolean;

Callers 5

handleStaticRouteFunction · 0.70
enhanceHttpServerSpanFunction · 0.70
bodyReporterFunction · 0.70
injectMetaTagsInResponseFunction · 0.70

Calls 2

objectifyFunction · 0.90
captureExceptionFunction · 0.90

Tested by

no test coverage detected