oro-sdk 3.4.0 → 3.5.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.
@@ -1808,23 +1808,33 @@ function _registerPatient() {
1808
1808
  return Promise.all([].concat(grantPromises, consultIndexPromises));
1809
1809
 
1810
1810
  case 43:
1811
+ _context3.next = 45;
1812
+ return buildConsultSearchIndex(consult, workflow, oroClient)["catch"](function (err) {
1813
+ console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1814
+ if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1815
+
1816
+ // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1817
+ errorsThrown.push(err);
1818
+ });
1819
+
1820
+ case 45:
1811
1821
  if (!(errorsThrown.length > 0)) {
1812
- _context3.next = 45;
1822
+ _context3.next = 47;
1813
1823
  break;
1814
1824
  }
1815
1825
 
1816
1826
  throw errorsThrown;
1817
1827
 
1818
- case 45:
1819
- _context3.next = 47;
1828
+ case 47:
1829
+ _context3.next = 49;
1820
1830
  return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
1821
1831
  statusMedical: initApis.MedicalStatus.New
1822
1832
  });
1823
1833
 
1824
- case 47:
1834
+ case 49:
1825
1835
  return _context3.abrupt("return", "break");
1826
1836
 
1827
- case 48:
1837
+ case 50:
1828
1838
  case "end":
1829
1839
  return _context3.stop();
1830
1840
  }