@paynext/sdk 0.0.131 → 0.0.133

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.es.js CHANGED
@@ -256,11 +256,15 @@ const Du = {
256
256
  const r = `${zc(e)}/payments/create`, i = new Headers();
257
257
  i.append("Content-Type", "application/json"), i.append("X-API-Version", n);
258
258
  const s = yb(t);
259
- return yield (yield fetch(r, {
260
- method: "POST",
261
- headers: i,
262
- body: JSON.stringify(s)
263
- })).json();
259
+ try {
260
+ return yield (yield fetch(r, {
261
+ method: "POST",
262
+ headers: i,
263
+ body: JSON.stringify(s)
264
+ })).json();
265
+ } catch (o) {
266
+ throw new Error("Failed to create payment: " + (o == null ? void 0 : o.message));
267
+ }
264
268
  }), vb = (t, e, n) => A(void 0, null, function* () {
265
269
  const r = `${zc(e)}/payments/create/billing/agreement`, i = new Headers();
266
270
  return i.append("Content-Type", "application/json"), i.append("X-API-Version", n), (yield (yield fetch(r, {
@@ -25494,7 +25498,7 @@ class Q5 {
25494
25498
  const C = new Error("Client token is required");
25495
25499
  throw C.name = "INVALID_SESSION", C;
25496
25500
  }
25497
- this.config.service.ev.preloadEvervault({ teamId: f, appId: p });
25501
+ this.config.service.ev.preloadEvervault({ teamId: f, appId: p }).finally();
25498
25502
  const v = yield n.updateTransaction(o, a, s);
25499
25503
  if (v != null && v.error) {
25500
25504
  const C = new Error("INVALID_SESSION");