MCPcopy Create free account
hub / github.com/effect-app/libs / reportSentry

Function reportSentry

packages/vue/src/errorReporter.ts:55–68  ·  view source on GitHub ↗
(
  error: CauseException<unknown>,
  extras: Record<string, unknown> | undefined,
  level: Sentry.SeverityLevel = "error"
)

Source from the content-addressed store, hash-verified

53}
54
55function reportSentry(
56 error: CauseException<unknown>,
57 extras: Record<string, unknown> | undefined,
58 level: Sentry.SeverityLevel = "error"
59) {
60 return Effect.sync(() => {
61 const scope = new Sentry.Scope()
62 scope.setLevel(level)
63 if (extras) scope.setContext("extras", extras)
64 scope.setContext("error", tryToReport(error))
65 scope.setContext("cause", tryToJson(error.originalCause))
66 Sentry.captureException(error, scope)
67 })
68}
69
70export function logError<E>(name: string) {
71 return Effect.fnUntraced(

Callers 1

reportErrorFunction · 0.70

Calls 4

tryToReportFunction · 0.90
tryToJsonFunction · 0.90
syncMethod · 0.80
setContextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…