@lvce-editor/extension-management-worker 4.16.0 → 4.17.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.
|
@@ -1752,11 +1752,14 @@ const getRuntimeContext = async (assetDir, platform) => {
|
|
|
1752
1752
|
};
|
|
1753
1753
|
};
|
|
1754
1754
|
|
|
1755
|
+
const getResponseErrorMessage = response => {
|
|
1756
|
+
return response.statusText || String(response.status) || 'Request failed';
|
|
1757
|
+
};
|
|
1755
1758
|
const getJson$1 = async url => {
|
|
1756
1759
|
try {
|
|
1757
1760
|
const response = await fetch(url);
|
|
1758
1761
|
if (!response.ok) {
|
|
1759
|
-
throw new Error(response
|
|
1762
|
+
throw new Error(getResponseErrorMessage(response));
|
|
1760
1763
|
}
|
|
1761
1764
|
const json = await response.json();
|
|
1762
1765
|
return json;
|