Go to https://nightly.nuxeo.com/nuxeo/site/api/v1/user/Administrator, you get the expected answer.
If you go to https://nightly.nuxeo.com/nuxeo/site/api/v1/user/ you get a 500.
Same thing if you shorten the URL https://nightly.nuxeo.com/nuxeo/site/api/v1/
If the request URL is wrong, the server has no internal error it cannot handle. The response status code should be something better.
This is for example annoying for production server monitoring, as these are false positive HTTP status 500 responses.
Normally, when Jersey doesn't find an endpoint, it returns a 404. I know that we override the default Exception handling at the WebEngine level. I'm also convinced that we should return better return code. 500 is about an error that the server doesn't know how to handle. From what I remember, we have something that tries to automatically introspect the stacktrace to give for instance automatically a 404 when there is a NoSuchDocumentException it the stacktrace. I'm not a big fan of such mechanism, and we really should review it
- depends on
-
NXP-18368 Upgrade to Jersey 2.x
- Open
- is related to
-
NXP-11094 Add Exception management in Automation
- Resolved
-
NXP-21724 Getting a doc that does not exist using REST api, does not return the cause error message
- Open
-
NXP-11403 org.nuxeo.ecm.automation.OperationException should not be mapped to HTTP 500
- Resolved
-
NXP-16661 Better http status code on rendition REST API
- Open
-
NXP-29867 Fix custom HTTP code thrown by event listener being ignored when DnD'ing a file in a folder in the Web UI
- Resolved
- is required by
-
NXP-23487 Exception is not logged by WebEngineExceptionMapper
- Resolved
-
NXDOC-1360 Document how to return custom HTTP status code through the REST API
- Resolved