@trops/dash-core 0.1.257 → 0.1.259

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.
@@ -31458,9 +31458,20 @@ var schedulerController_1 = schedulerController$2;
31458
31458
  }
31459
31459
  }
31460
31460
 
31461
- const response = await fetch(downloadUrl, fetchOpts);
31462
- if (!response.ok)
31461
+ let response;
31462
+ try {
31463
+ response = await fetch(downloadUrl, fetchOpts);
31464
+ } catch (fetchErr) {
31465
+ throw new Error(
31466
+ "Could not reach the download server. Check your connection and try again.",
31467
+ );
31468
+ }
31469
+ if (!response.ok) {
31470
+ if (response.status === 401) {
31471
+ throw new Error("Authentication required to download this widget");
31472
+ }
31463
31473
  throw new Error(`Failed to fetch: ${response.statusText}`);
31474
+ }
31464
31475
 
31465
31476
  const contentType = response.headers.get("content-type") || "";
31466
31477
  let buffer = Buffer.from(await response.arrayBuffer());