MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / captureCause

Function captureCause

apps/cloud/src/observability/index.ts:147–158  ·  view source on GitHub ↗
(
  input: unknown,
  context: OtelCorrelationContext | null = null,
)

Source from the content-addressed store, hash-verified

145};
146
147export const captureCause = (
148 input: unknown,
149 context: OtelCorrelationContext | null = null,
150): string | undefined => {
151 const { primary, pretty } = sentryPayloadForCause(input);
152 tagCurrentSentryScopeWithOtelContext(context);
153 return Sentry.captureException(primary, (scope) => {
154 tagSentryScopeWithOtelContext(scope, context);
155 if (pretty !== null) scope.setExtra("cause", pretty);
156 return scope;
157 });
158};
159
160export const captureCauseEffect = (input: unknown): Effect.Effect<string | undefined> =>
161 Effect.gen(function* () {

Callers 4

server.tsFile · 0.90
toErrorResponseFunction · 0.90
toErrorServerResponseFunction · 0.90
captureCauseEffectFunction · 0.70

Tested by

no test coverage detected