@msafe/sui3-sdk 0.0.42-pre-4668e75.0 → 0.0.42-pre-e22a1ab.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.
- package/dist/index.cjs +6 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/backend/BackendImpl.ts +7 -11
package/dist/index.cjs
CHANGED
|
@@ -10443,21 +10443,17 @@ var BackendImpl = class _BackendImpl {
|
|
|
10443
10443
|
}
|
|
10444
10444
|
async get(url, config) {
|
|
10445
10445
|
const fullUrl = this.getFullUrl(url);
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
throw error ?? new Error(response.statusText);
|
|
10451
|
-
}
|
|
10452
|
-
return response;
|
|
10453
|
-
} catch (e) {
|
|
10454
|
-
throw BackendError2.fromError(e) ?? e;
|
|
10446
|
+
const response = await import_axios2.default.get(fullUrl, config);
|
|
10447
|
+
if (import_axios2.default.isAxiosError(response)) {
|
|
10448
|
+
const error = BackendError2.fromError(response);
|
|
10449
|
+
throw error ?? new Error(response.statusText);
|
|
10455
10450
|
}
|
|
10451
|
+
return response;
|
|
10456
10452
|
}
|
|
10457
10453
|
async post(url, data, config) {
|
|
10458
10454
|
const fullUrl = this.getFullUrl(url);
|
|
10459
10455
|
const response = await import_axios2.default.post(fullUrl, data, config);
|
|
10460
|
-
if (response
|
|
10456
|
+
if (import_axios2.default.isAxiosError(response)) {
|
|
10461
10457
|
const error = BackendError2.fromError(response);
|
|
10462
10458
|
throw error ?? new Error(response.statusText);
|
|
10463
10459
|
}
|