Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔥 Remove @sentry/nextjs from tRPC participants router (RAL-1033) (#2241)
Luke Vellaa2cf1c73f9eb
diff --git a/apps/web/src/trpc/routers/polls/participants.ts b/apps/web/src/trpc/routers/polls/participants.tsindex 55b408b4a..af81c9ed5 100644--- a/apps/web/src/trpc/routers/polls/participants.ts+++ b/apps/web/src/trpc/routers/polls/participants.ts@@ -1,9 +1,10 @@import { prisma } from "@rallly/database";+import { createLogger } from "@rallly/logger";import { absoluteUrl } from "@rallly/utils/absolute-url";-import * as Sentry from "@sentry/nextjs";import { TRPCError } from "@trpc/server";import { waitUntil } from "@vercel/functions";import * as z from "zod";+import { hasPollAdminAccess } from "@/features/poll/query";import { getEmailClient } from "@/utils/emails";import { createToken } from "@/utils/session";@@ -16,6 +17,8 @@ import {import type { DisableNotificationsPayload } from "../../types";import { createParticipantEditToken, resolveUserId } from "./utils";+const logger = createLogger("participants");+const MAX_PARTICIPANTS = 1000;async function canModifyParticipant(participantId: string, userId: string) {@@ -91,7 +94,10 @@ async function sendNewParticipantNotifcationEmail({},});} catch (err) {- Sentry.captureException(err);+ logger.error(+ { error: err, pollId },+ "Failed to send watcher notification email",+ );}}),);