fix: add 10s timeout to Loops fetches (#543)

This commit is contained in:
Ben Senescu 2026-08-26 11:41:22 -04:00 committed by GitHub
parent 95551a425a
commit 0abde80109
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ export async function updateLoopsContact({
Authorization: `Bearer ${apiKey}`,
},
body: JSON.stringify(payload),
signal: AbortSignal.timeout(10_000),
});
if (response.ok) {
@ -42,7 +43,7 @@ export async function updateLoopsContact({
}
const errorPayload = await response.json().catch(() => null);
console.error("Loops contact update error:", {
console.warn("Loops contact update error:", {
status: response.status,
email: payload.email,
userId: payload.userId,

View File

@ -58,6 +58,7 @@ async function sendLoopsTransactionalEmail({
addToAudience: false,
dataVariables,
}),
signal: AbortSignal.timeout(10_000),
});
if (response.ok) {