@paynext/sdk 0.0.131 → 0.0.132

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, {