Inicio do Projeto Piloto
ci / verify (push) Has been cancelled

This commit is contained in:
camilafagundes committed 2026-10-02 23:59:36 -03:00
1 parent 6e23f1533b
commit 419325db12
52 files changed
+1329 -110

No files matched your search

+13 -2
View File
@@ -1,4 +1,15 @@
export { scrubSentryEvent } from "./scrub";
import { scrubSentryEvent, sentrySafeError } from "./scrub";
export { scrubSentryEvent, sentrySafeError };
export function buildSentryPayload(error: unknown, tags: Record<string, string>) {
const safe = sentrySafeError(error);
return scrubSentryEvent({
message: safe.message,
extra: tags,
exception: { values: [{ value: error instanceof Error ? error.message : "UNEXPECTED" }] },
});
}
export function captureAdapterException(error: unknown, tags: Record<string, string>): void {
if (!process.env.SENTRY_DSN && !process.env.NEXT_PUBLIC_SENTRY_DSN) return;
@@ -6,7 +17,7 @@ export function captureAdapterException(error: unknown, tags: Record<string, str
Sentry.withScope((scope) => {
scope.setTag("module", "spreadsheet-adapter");
for (const [key, value] of Object.entries(tags)) scope.setTag(key, value.slice(0, 120));
Sentry.captureException(error);
Sentry.captureException(sentrySafeError(error));
});
});
}