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

Be more specific on HTTP error handling when fetching the batch ID associated to an upload

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.1.4
    • Fix Version/s: 4.4.4
    • Component/s: Remote client

      Description

      Error

      When resuming an upload, we first check for the batch ID validity using that pseudo-code:

      try:
          get_batch_details(BATCHID)
      except Exception:
          log.warning("No batch ID found, restarting the upload from zero")
      

      This is bad: we are catching all exceptions. And if the server is busy (likely when uploading a big file) it may return a HTTP error 502, 503 or 504. And those errors are not telling us that the batch ID is inexistant.

      Fix

      We should only catch the specific HTTP error 404.
      Other errors will propagate to the upper level and will be handled accordingly.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h