Affects Version/s: 10.10
Component/s: Rest API
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
the response of the POST request has the custom HTTP code and the error message from the originating exception