@plaidev/karte-action-sdk 1.1.206-28212827.fab6eaf0 → 1.1.206-28212859.21a77059
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hydrate/index.es.js +10 -3
- package/dist/index.es.js +10 -3
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
@@ -1324,11 +1324,18 @@ function request(url, data, cb) {
|
|
1324
1324
|
'Content-Type': 'text/plain;charset=UTF-8',
|
1325
1325
|
},
|
1326
1326
|
body: JSON.stringify({ ...data }),
|
1327
|
-
})
|
1327
|
+
})
|
1328
|
+
.then(response => {
|
1328
1329
|
if (!response.ok) {
|
1329
|
-
|
1330
|
+
throw new Error(`fail to request collection api. reason: ${response.status}`);
|
1330
1331
|
}
|
1331
|
-
return
|
1332
|
+
return response.json();
|
1333
|
+
})
|
1334
|
+
.then(data => {
|
1335
|
+
return cb(null, data);
|
1336
|
+
})
|
1337
|
+
.catch(err => {
|
1338
|
+
return cb(err, null);
|
1332
1339
|
});
|
1333
1340
|
}
|
1334
1341
|
/** @internal */
|
package/dist/index.es.js
CHANGED
@@ -1347,11 +1347,18 @@ function request(url, data, cb) {
|
|
1347
1347
|
'Content-Type': 'text/plain;charset=UTF-8',
|
1348
1348
|
},
|
1349
1349
|
body: JSON.stringify({ ...data }),
|
1350
|
-
})
|
1350
|
+
})
|
1351
|
+
.then(response => {
|
1351
1352
|
if (!response.ok) {
|
1352
|
-
|
1353
|
+
throw new Error(`fail to request collection api. reason: ${response.status}`);
|
1353
1354
|
}
|
1354
|
-
return
|
1355
|
+
return response.json();
|
1356
|
+
})
|
1357
|
+
.then(data => {
|
1358
|
+
return cb(null, data);
|
1359
|
+
})
|
1360
|
+
.catch(err => {
|
1361
|
+
return cb(err, null);
|
1355
1362
|
});
|
1356
1363
|
}
|
1357
1364
|
/** @internal */
|