unprint 0.19.9 → 0.19.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +10 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.19.9",
3
+ "version": "0.19.10",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {
package/src/app.js CHANGED
@@ -1280,10 +1280,16 @@ async function getBrowserInstance(scope, options, useProxy = false, useRemote =
1280
1280
  clients.set(scopeKey, client);
1281
1281
  }
1282
1282
 
1283
- const { browser, context } = await launchers;
1283
+ try {
1284
+ const { browser, context } = await launchers;
1285
+
1286
+ client.browser = browser;
1287
+ client.context = context;
1288
+ } catch (error) {
1289
+ clients.delete(scopeKey);
1284
1290
 
1285
- client.browser = browser;
1286
- client.context = context;
1291
+ return error;
1292
+ }
1287
1293
 
1288
1294
  return client;
1289
1295
  }
@@ -1405,7 +1411,7 @@ async function browserRequest(url, customOptions = {}) {
1405
1411
  events.emit('requestInit', feedbackBase);
1406
1412
 
1407
1413
  return limiter.schedule(async () => {
1408
- const client = await getBrowserInstance(options.client, options, useProxy, useRemote).catch((error) => error);
1414
+ const client = await getBrowserInstance(options.client, options, useProxy, useRemote);
1409
1415
 
1410
1416
  if (client instanceof Error) {
1411
1417
  return {