Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-212

Do not shadow all errors when getting CMIS data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core

      Description

      When calling the CMIS endpoint, all errors are shadowed.
      Thus, third-party applications like Nuxeo Drive cannot handle specific errors.

      For instance, credentials errors should be forwarded instead of being ignored:

      2021-03-12 11:09:31 8458 140202635511616 DEBUG    nuxeo.client       Calling GET 'https://<HOST>/nuxeo/json/cmis'
      2021-03-12 11:09:31 8458 140202635511616 WARNING  nuxeo.client       Invalid response data when called server_info()
      Traceback (most recent call last):
        File "nuxeo/client.py", line 305, in request
        File "requests/models.py", line 943, in raise_for_status
      requests.exceptions.HTTPError: 401 Client Error:  for url: https://<HOST>/nuxeo/json/cmis
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "nuxeo/client.py", line 387, in server_info
        File "nuxeo/client.py", line 308, in request
      nuxeo.exceptions.Unauthorized: Unauthorized(401)
      

      In that case, it is required for Drive to know that credentials are bad to alert the user.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: