2
0

💚 Fix sentry not receiving events

This commit is contained in:
Baptiste Arnaud
2022-12-16 08:39:14 +01:00
parent 92dc797b6c
commit 68de7b720f
75 changed files with 194 additions and 332 deletions

View File

@ -6,7 +6,6 @@ import {
notAuthenticated,
} from 'utils/api'
import Stripe from 'stripe'
import { withSentry } from '@sentry/nextjs'
import { getAuthenticatedUser } from '@/features/auth/api'
import prisma from '@/lib/prisma'
import { WorkspaceRole } from 'db'
@ -39,4 +38,4 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
return methodNotAllowed(res)
}
export default withSentry(handler)
export default handler

View File

@ -1,4 +1,3 @@
import { withSentry } from '@sentry/nextjs'
import { Plan } from 'db'
import prisma from '@/lib/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
@ -58,4 +57,4 @@ const createCheckoutSession = async (userId: string) => {
})
}
export default withSentry(handler)
export default handler

View File

@ -6,7 +6,6 @@ import {
notAuthenticated,
} from 'utils/api'
import Stripe from 'stripe'
import { withSentry } from '@sentry/nextjs'
import { getAuthenticatedUser } from '@/features/auth/api'
import prisma from '@/lib/prisma'
import { WorkspaceRole } from 'db'
@ -46,4 +45,4 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
return methodNotAllowed(res)
}
export default withSentry(handler)
export default handler

View File

@ -7,7 +7,6 @@ import {
notAuthenticated,
} from 'utils/api'
import Stripe from 'stripe'
import { withSentry } from '@sentry/nextjs'
import { getAuthenticatedUser } from '@/features/auth/api'
import prisma from '@/lib/prisma'
import { Plan, WorkspaceRole } from 'db'
@ -258,4 +257,4 @@ const parseSubscriptionItems = (
: []
)
export default withSentry(handler)
export default handler

View File

@ -4,7 +4,6 @@ import Stripe from 'stripe'
import Cors from 'micro-cors'
import { buffer } from 'micro'
import prisma from '@/lib/prisma'
import { withSentry } from '@sentry/nextjs'
import { Plan } from 'db'
if (!process.env.STRIPE_SECRET_KEY || !process.env.STRIPE_WEBHOOK_SECRET)
@ -128,4 +127,4 @@ const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {
return methodNotAllowed(res)
}
export default withSentry(cors(webhookHandler as any))
export default cors(webhookHandler as any)