From cb30863067ea10d640188f0321aee97b98d6e949 Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Fri, 3 Apr 2026 09:26:16 -0700 Subject: [PATCH] fix: await route.continue() in screenshot utility Make the route handler async and await route.continue() to prevent floating unhandled rejections on network errors, per Greptile P2 finding. Co-Authored-By: Paperclip --- scripts/screenshot.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/screenshot.cjs b/scripts/screenshot.cjs index cf405406160..f267bd0653b 100644 --- a/scripts/screenshot.cjs +++ b/scripts/screenshot.cjs @@ -74,8 +74,8 @@ const origin = new URL(url).origin; const page = await context.newPage(); // Scope the auth header to the Paperclip origin only - await page.route(`${origin}/**`, (route) => { - route.continue({ + await page.route(`${origin}/**`, async (route) => { + await route.continue({ headers: { ...route.request().headers(), Authorization: `Bearer ${cred.token}` }, }); });