@behindthemusictree/app-kit 32.0.3 → 33.0.0

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.
@@ -91,8 +91,8 @@ import {
91
91
  useTrackListSidebarVisibility,
92
92
  useUpdateGenre,
93
93
  useVisibleGenrePlaylists
94
- } from "../chunk-4EBHHVZI.js";
95
- import "../chunk-BVWRP6IK.js";
94
+ } from "../chunk-JRUPUUYV.js";
95
+ import "../chunk-A6GKSUJA.js";
96
96
  import "../chunk-T5D5T52J.js";
97
97
  import "../chunk-4MEK3CNF.js";
98
98
  import "../chunk-XCOAWKF6.js";
package/dist/index.cjs CHANGED
@@ -577,6 +577,7 @@ var assertWellFormedRequest = (url, options) => {
577
577
  throw Object.assign(createAppErrorFromErrorCode("CLI5000" /* CLIENT_INTERNAL_ERROR */), { cause: error });
578
578
  }
579
579
  };
580
+ var isCallerAbort = (error, signal) => !!signal?.aborted && error?.name !== "TimeoutError";
580
581
  var fetchWrapper = async (url, requiresAuth, options = {}, accessToken, queryParams, handleMissingRequiredSession, handleError, expectBinary = false, backendBaseUrl) => {
581
582
  const urlWithParams = queryParams ? `${url}${url.includes("?") ? "&" : "?"}${new URLSearchParams(
582
583
  Object.entries(queryParams).map(([key, value]) => [key, String(value)])
@@ -611,6 +612,7 @@ var fetchWrapper = async (url, requiresAuth, options = {}, accessToken, queryPar
611
612
  return result.json();
612
613
  }
613
614
  } catch (caughtError) {
615
+ if (isCallerAbort(caughtError, finalOptions.signal)) throw caughtError;
614
616
  let appError = null;
615
617
  if (caughtError instanceof AppError) {
616
618
  appError = caughtError;
@@ -1198,7 +1200,7 @@ function useConnectivityErrorPopup({
1198
1200
  } else if (error instanceof BadRequestError || error instanceof BackendError || error instanceof ServiceError || error instanceof AuthRequired) {
1199
1201
  popup = renderer.renderInternalErrorPopup(error.code);
1200
1202
  } else if (error instanceof NetworkError) {
1201
- popup = renderer.renderNetworkErrorPopup();
1203
+ popup = renderer.renderNetworkErrorPopup(error.code);
1202
1204
  }
1203
1205
  if (popup) {
1204
1206
  showPopup(popup, popupType);