Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(bill): add requestId to webhook processing
  • Loading branch information
waleedlatif1 committed Dec 1, 2025
commit cfa0b9ef5af04adede3042295be35e48906a7951
7 changes: 1 addition & 6 deletions apps/sim/app/api/webhooks/test/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{

let preprocessError: NextResponse | null = null
try {
preprocessError = await checkWebhookPreprocessing(
foundWorkflow,
foundWebhook,
requestId,
true // testMode - skips usage limits
)
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
if (preprocessError) {
return preprocessError
}
Expand Down
7 changes: 1 addition & 6 deletions apps/sim/app/api/webhooks/trigger/[path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ export async function POST(

let preprocessError: NextResponse | null = null
try {
preprocessError = await checkWebhookPreprocessing(
foundWorkflow,
foundWebhook,
requestId,
false // testMode
)
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
if (preprocessError) {
return preprocessError
}
Expand Down
3 changes: 1 addition & 2 deletions apps/sim/lib/webhooks/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ export async function verifyProviderAuth(
export async function checkWebhookPreprocessing(
foundWorkflow: any,
foundWebhook: any,
requestId: string,
testMode: boolean
requestId: string
): Promise<NextResponse | null> {
try {
const executionId = uuidv4()
Expand Down