Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-699

Improve exception propagation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.1
    • Component/s: None
    • Tags:
    • Backlog priority:
      800

      Description

      in nxdrive.client.base_automation_client.BaseAutomationClient class, the execute method:

          def execute(self, command, url=None, op_input=None, timeout=-1,
                      check_params=True, void_op=False, extra_headers=None,
                      file_out=None, **params):
              ...
              try:
                  resp = self.opener.open(req, timeout=timeout)
              except Exception as e:
                  log_details = self._log_details(e)
                  if isinstance(log_details, tuple):
                      _, _, _, error = log_details
                      if error and error.startswith("Unable to find batch"):
                          raise InvalidBatchException()
                  raise e
             ...
      

      The exception is here catched. It may be better to let it propagate.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: