-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 8.10, 9.2
- Install Nuxeo 8.10
- Install ffischer-8-rest-test.zip package
- copy jar file event-test-project-core-1.0-SNAPSHOT.jar
- Start server
- create a document of type myDoc
- retrieve its id by exporting it as XML for example
- try to modify it through rest:
curl -u Administrator:Administrator -H "Content-Type: application/json" -X PUT http://localhost:8080/nuxeo/api/v1/id/beed4b9d-611e-4e0d-b46a-ac3fe5afc53a -d '{ "entity-type": "document", "repository": "default", "uid": "4fe2843b-298c-42dd-bc32-4180ee521761", "properties": { "dc:title": "The new title", "dc:description": "Attempt to update through REST API" } }'
- this returns the full stack of the exception
- setting the parameter org.nuxeo.rest.stack.enable to false does not change the behavior
- the same could be observed in a unit test by trying the JsonFactoryManager.toggleStackDisplay method
After checking with dev in a debug session, this is due to the following code in JsonWebengineWriter:
if (jsonFactoryManager.isStackDisplay() || MediaType.valueOf(MediaType.APPLICATION_JSON + "+nxentity").equals(mediaType)) {
When raising the exception, at some point the type is changed from application/json to application/nx+entity thus falsing the above condition.
- duplicates
-
NXP-23934 Do not send the whole exception stack trace by default
- Open