⬆️ Upgrade sentry and improve its reliability
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
"dependencies": {
|
||||
"@paralleldrive/cuid2": "2.2.1",
|
||||
"@planetscale/database": "^1.8.0",
|
||||
"@sentry/nextjs": "7.66.0",
|
||||
"@trpc/server": "10.34.0",
|
||||
"@sentry/nextjs": "7.73.0",
|
||||
"@trpc/server": "10.40.0",
|
||||
"@typebot.io/emails": "workspace:*",
|
||||
"@typebot.io/env": "workspace:*",
|
||||
"@typebot.io/lib": "workspace:*",
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from '@typebot.io/schemas/features/whatsapp'
|
||||
import { convertMessageToWhatsAppMessage } from './convertMessageToWhatsAppMessage'
|
||||
import { sendWhatsAppMessage } from './sendWhatsAppMessage'
|
||||
import { captureException } from '@sentry/nextjs'
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
import { HTTPError } from 'got'
|
||||
import { convertInputToWhatsAppMessages } from './convertInputToWhatsAppMessage'
|
||||
import { isNotDefined } from '@typebot.io/lib/utils'
|
||||
@ -108,7 +108,7 @@ export const sendChatReplyToWhatsApp = async ({
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
captureException(err, { extra: { message } })
|
||||
Sentry.captureException(err, { extra: { message } })
|
||||
console.log('Failed to send message:', JSON.stringify(message, null, 2))
|
||||
if (err instanceof HTTPError)
|
||||
console.log('HTTPError', err.response.statusCode, err.response.body)
|
||||
@ -139,7 +139,7 @@ export const sendChatReplyToWhatsApp = async ({
|
||||
credentials,
|
||||
})
|
||||
} catch (err) {
|
||||
captureException(err, { extra: { message } })
|
||||
Sentry.captureException(err, { extra: { message } })
|
||||
console.log('Failed to send message:', JSON.stringify(message, null, 2))
|
||||
if (err instanceof HTTPError)
|
||||
console.log('HTTPError', err.response.statusCode, err.response.body)
|
||||
@ -209,7 +209,7 @@ const executeClientSideAction =
|
||||
credentials: context.credentials,
|
||||
})
|
||||
} catch (err) {
|
||||
captureException(err, { extra: { message } })
|
||||
Sentry.captureException(err, { extra: { message } })
|
||||
console.log('Failed to send message:', JSON.stringify(message, null, 2))
|
||||
if (err instanceof HTTPError)
|
||||
console.log('HTTPError', err.response.statusCode, err.response.body)
|
||||
|
@ -58,7 +58,8 @@ export const startWhatsAppSession = async ({
|
||||
|
||||
const publicTypebotWithMatchedCondition = botsWithWhatsAppEnabled.find(
|
||||
(publicTypebot) =>
|
||||
publicTypebot.settings.whatsApp?.startCondition &&
|
||||
(publicTypebot.settings.whatsApp?.startCondition?.comparisons.length ??
|
||||
0) > 0 &&
|
||||
messageMatchStartCondition(
|
||||
incomingMessage ?? '',
|
||||
publicTypebot.settings.whatsApp?.startCondition
|
||||
|
Reference in New Issue
Block a user