@pelcro/react-pelcro-js 3.23.0-beta.2 → 3.23.0-beta.3

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.js CHANGED
@@ -17427,19 +17427,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17427
17427
 
17428
17428
  /*====== Start Cybersource integration ========*/
17429
17429
  const cybersourceErrorHandle = err => {
17430
- var _err$details, _err$details$response;
17431
- const errorMessages = [];
17432
-
17433
- // enumerable error (ex: validation errors)
17434
- Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
17435
- let {
17436
- message
17437
- } = _ref2;
17438
- errorMessages.push(message);
17439
- });
17430
+ console.log("Starting handling the error");
17431
+ if (err.details.length > 0) {
17432
+ var _err$details, _err$details$response;
17433
+ console.log("error.details has items");
17434
+ const errorMessages = [];
17435
+
17436
+ // enumerable error (ex: validation errors)
17437
+ Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
17438
+ let {
17439
+ message
17440
+ } = _ref2;
17441
+ errorMessages.push(message);
17442
+ });
17440
17443
 
17441
- // convert to multiline string
17442
- return errorMessages.join("\n");
17444
+ // convert to multiline string
17445
+ return errorMessages.join("\n");
17446
+ } else {
17447
+ console.log("Handling the error the normal way");
17448
+ return getErrorMessages(err);
17449
+ }
17443
17450
  };
17444
17451
  const submitUsingCybersource = (state, dispatch) => {
17445
17452
  var _cybersourceInstanceR;
package/dist/index.esm.js CHANGED
@@ -17397,19 +17397,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17397
17397
 
17398
17398
  /*====== Start Cybersource integration ========*/
17399
17399
  const cybersourceErrorHandle = err => {
17400
- var _err$details, _err$details$response;
17401
- const errorMessages = [];
17402
-
17403
- // enumerable error (ex: validation errors)
17404
- Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
17405
- let {
17406
- message
17407
- } = _ref2;
17408
- errorMessages.push(message);
17409
- });
17400
+ console.log("Starting handling the error");
17401
+ if (err.details.length > 0) {
17402
+ var _err$details, _err$details$response;
17403
+ console.log("error.details has items");
17404
+ const errorMessages = [];
17405
+
17406
+ // enumerable error (ex: validation errors)
17407
+ Object.values(err === null || err === void 0 ? void 0 : (_err$details = err.details) === null || _err$details === void 0 ? void 0 : (_err$details$response = _err$details.responseStatus) === null || _err$details$response === void 0 ? void 0 : _err$details$response.details).forEach(_ref2 => {
17408
+ let {
17409
+ message
17410
+ } = _ref2;
17411
+ errorMessages.push(message);
17412
+ });
17410
17413
 
17411
- // convert to multiline string
17412
- return errorMessages.join("\n");
17414
+ // convert to multiline string
17415
+ return errorMessages.join("\n");
17416
+ } else {
17417
+ console.log("Handling the error the normal way");
17418
+ return getErrorMessages(err);
17419
+ }
17413
17420
  };
17414
17421
  const submitUsingCybersource = (state, dispatch) => {
17415
17422
  var _cybersourceInstanceR;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.23.0-beta.2",
4
+ "version": "3.23.0-beta.3",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",