Skip to content

Commit e80feee

Browse files
authored
fix(bill): add requestId to webhook processing (#2144)
1 parent 7f62467 commit e80feee

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

apps/sim/app/api/webhooks/test/[id]/route.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{
6969

7070
let preprocessError: NextResponse | null = null
7171
try {
72-
preprocessError = await checkWebhookPreprocessing(
73-
foundWorkflow,
74-
foundWebhook,
75-
requestId,
76-
true // testMode - skips usage limits
77-
)
72+
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
7873
if (preprocessError) {
7974
return preprocessError
8075
}

apps/sim/app/api/webhooks/trigger/[path]/route.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,7 @@ export async function POST(
125125

126126
let preprocessError: NextResponse | null = null
127127
try {
128-
preprocessError = await checkWebhookPreprocessing(
129-
foundWorkflow,
130-
foundWebhook,
131-
requestId,
132-
false // testMode
133-
)
128+
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
134129
if (preprocessError) {
135130
return preprocessError
136131
}

apps/sim/lib/webhooks/processor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,7 @@ export async function verifyProviderAuth(
498498
export async function checkWebhookPreprocessing(
499499
foundWorkflow: any,
500500
foundWebhook: any,
501-
requestId: string,
502-
testMode: boolean
501+
requestId: string
503502
): Promise<NextResponse | null> {
504503
try {
505504
const executionId = uuidv4()

0 commit comments

Comments
 (0)