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

Handle Unauthorized errors from Processor

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.1.0
    • Component/s: Framework

      Description

      Issue

      Surprinsingly, when an error is thrown from the Processor, it is not catched and we have such stacktraces:

        File "nxdrive\engine\processor.py", line 262, in _execute
        File "nxdrive\engine\processor.py", line 743, in _synchronize_locally_created
        File "nxdrive\client\remote_client.py", line 377, in stream_file
        File "nxdrive\client\remote_client.py", line 220, in upload
        File "lib\site-packages\nuxeo\uploads.py", line 60, in post
        File "lib\site-packages\nuxeo\client.py", line 197, in request
      Unauthorized: Unauthorized(401), error: '...,' server trace: None
      

      Fix

      Instead of stopping the synchronization and putting the Engine in offline mode, as this error can happen on different level in the tree, we will put those documents in error.
      And when the user will have enough rights to sync them, errors will automatically be removed and files synced.

      If the user lost its token for real, the RemoteWatcher will set invalid credentials when looking for remotes changes.

        Attachments

          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 - 6 hours, 30 minutes
                6h 30m