Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29867

Fix custom HTTP code thrown by event listener being ignored when DnD'ing a file in a folder in the Web UI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF39, 11.5, 2021.1
    • Component/s: Rest API
    • Release Notes Summary:
      A proper error message and HTTP code is returned when a drag'n drop fails in WebUI.
    • Backlog priority:
      800
    • Sprint:
      nxplatform #23, nxplatform #24, nxplatform #25
    • Story Points:
      3

      Description

      A java event listener can throw an exception with a custom HTTP code and error message so that the HTTP code+error message get returned by the REST API. It works fine when creating documents with the + button in the Web UI.

      The problem is it does not work when the user drags and drops a file in a folderish document in the Web UI, the operation FileManager.Import throws a 500 HTTP code and not the custom one from the exception.

      See the stacktraces from the server.log file in the attached file.

      See the attached ZIP file for a java bundle with such an event listener:

      • drop the java bundle's jar file in directory nxserver/bundles/ of a Nuxeo distribution
      • restart the Nuxeo Platform
      • log in the Web UI
      • create a workspace named NXP under /default-domain/workspaces and navigate to it
      • DnD a file in workspace NXP's listing

      Expected result: the response of the POST request has the custom HTTP code and the error message from the originating exception

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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
                  6h