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 <noreply@paperclip.ing>
This commit is contained in:
Devin FoleyandPaperclip committed 2026-04-03 09:26:16 -07:00
1 parent 6cd9e7eb3c
commit cb30863067
1 file changed
+2 -2
+2 -2
View File
@@ -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}` },
});
});