mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
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:
1 parent
6cd9e7eb3c
commit
cb30863067
1 file changed
+2
-2
@@ -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}` },
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user