Skip to content

Commit 41b0348

Browse files
committed
fix(webhooks): address remaining review follow-ups
Loosen Linear's replay window to better tolerate delayed retries and make Notion event mismatches return false consistently with the rest of the hardened providers. Made-with: Cursor
1 parent 7c31044 commit 41b0348

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

apps/sim/lib/webhooks/providers/linear.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Linear webhook provider', () => {
4141
const rawBody = JSON.stringify({
4242
action: 'update',
4343
type: 'Issue',
44-
webhookTimestamp: Date.now() - 120_000,
44+
webhookTimestamp: Date.now() - 600_000,
4545
})
4646

4747
const res = await linearHandler.verifyAuth!({

apps/sim/lib/webhooks/providers/linear.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function validateLinearSignature(secret: string, signature: string, body: string
4242
}
4343
}
4444

45-
const LINEAR_WEBHOOK_TIMESTAMP_SKEW_MS = 60 * 1000
45+
const LINEAR_WEBHOOK_TIMESTAMP_SKEW_MS = 5 * 60 * 1000
4646

4747
export const linearHandler: WebhookProviderHandler = {
4848
async verifyAuth({

apps/sim/lib/webhooks/providers/notion.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ export const notionHandler: WebhookProviderHandler = {
127127
receivedEvent: eventType,
128128
}
129129
)
130-
return NextResponse.json({
131-
message: 'Event type does not match trigger configuration. Ignoring.',
132-
})
130+
return false
133131
}
134132
}
135133

0 commit comments

Comments
 (0)