fix(bill): add requestId to webhook processing (#2144)

This commit is contained in:
Waleed
2025-11-30 21:21:54 -08:00
committed by GitHub
parent 7f62467f84
commit e80feee51f
3 changed files with 3 additions and 14 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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()