diff --git a/extension/src/helpers/hooks/useGetAppData.tsx b/extension/src/helpers/hooks/useGetAppData.tsx index 8b4ce2de8c..7e64e71736 100644 --- a/extension/src/helpers/hooks/useGetAppData.tsx +++ b/extension/src/helpers/hooks/useGetAppData.tsx @@ -91,7 +91,7 @@ function useGetAppData() { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); reduxDispatch(saveAccountError(error)); Sentry.captureException(`Error loading app data: ${error}`); - throw new Error("Failed to fetch app data", { cause: error }); + throw new Error(`Failed to fetch app data - ${error}`); } }; diff --git a/extension/src/helpers/hooks/useGetAssetDomainsWithBalances.ts b/extension/src/helpers/hooks/useGetAssetDomainsWithBalances.ts index ec1533eedd..81500cd0b3 100644 --- a/extension/src/helpers/hooks/useGetAssetDomainsWithBalances.ts +++ b/extension/src/helpers/hooks/useGetAssetDomainsWithBalances.ts @@ -191,7 +191,7 @@ export function useGetAssetDomainsWithBalances(getBalancesOptions: { return payload; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch domains", { cause: error }); + throw new Error(`Failed to fetch domains - ${error}`); } }; diff --git a/extension/src/helpers/hooks/useGetBalances.tsx b/extension/src/helpers/hooks/useGetBalances.tsx index ceda023074..5a5451d1ca 100644 --- a/extension/src/helpers/hooks/useGetBalances.tsx +++ b/extension/src/helpers/hooks/useGetBalances.tsx @@ -134,7 +134,7 @@ function useGetBalances(options: { return payload; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch balances", { cause: error }); + throw new Error(`Failed to fetch balances - ${error}`); } }; diff --git a/extension/src/helpers/hooks/useGetHistory.tsx b/extension/src/helpers/hooks/useGetHistory.tsx index 7cf9c4dcc8..8f9fb1a133 100644 --- a/extension/src/helpers/hooks/useGetHistory.tsx +++ b/extension/src/helpers/hooks/useGetHistory.tsx @@ -24,7 +24,7 @@ function useGetHistory() { return data; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch history", { cause: error }); + throw new Error(`Failed to fetch history - ${error}`); } }; diff --git a/extension/src/popup/components/manageAssets/SearchAsset/hooks/useSearchData.tsx b/extension/src/popup/components/manageAssets/SearchAsset/hooks/useSearchData.tsx index 203a605926..63e7105929 100644 --- a/extension/src/popup/components/manageAssets/SearchAsset/hooks/useSearchData.tsx +++ b/extension/src/popup/components/manageAssets/SearchAsset/hooks/useSearchData.tsx @@ -77,7 +77,7 @@ function useGetSearchData(options: { return payload; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch search data", { cause: error }); + throw new Error(`Failed to fetch search data - ${error}`); } }; diff --git a/extension/src/popup/components/sendPayment/SendDestinationAsset/hooks/useGetDestAssetData.tsx b/extension/src/popup/components/sendPayment/SendDestinationAsset/hooks/useGetDestAssetData.tsx index c009f88b43..fbab01bb55 100644 --- a/extension/src/popup/components/sendPayment/SendDestinationAsset/hooks/useGetDestAssetData.tsx +++ b/extension/src/popup/components/sendPayment/SendDestinationAsset/hooks/useGetDestAssetData.tsx @@ -78,7 +78,7 @@ export function useGetDestAssetData(getBalancesOptions: { return payload; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch domains", { cause: error }); + throw new Error(`Failed to fetch domains - ${error}`); } }; diff --git a/extension/src/popup/components/swap/SwapAsset/hooks/useSwapFromData.tsx b/extension/src/popup/components/swap/SwapAsset/hooks/useSwapFromData.tsx index ca8a902099..d4b12bdb06 100644 --- a/extension/src/popup/components/swap/SwapAsset/hooks/useSwapFromData.tsx +++ b/extension/src/popup/components/swap/SwapAsset/hooks/useSwapFromData.tsx @@ -80,7 +80,7 @@ export function useGetSwapFromData(getBalancesOptions: { return payload; } catch (error) { dispatch({ type: "FETCH_DATA_ERROR", payload: error }); - throw new Error("Failed to fetch data", { cause: error }); + throw new Error(`Failed to fetch data - ${error}`); } };