joerghoh commented on a change in pull request #6:
URL:
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/6#discussion_r532852278
##########
File path:
src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java
##########
@@ -234,6 +235,11 @@ protected void doPost(final SlingHttpServletRequest
request,
} catch (ResourceNotFoundException rnfe) {
htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND,
rnfe.getMessage());
+ } catch (final PersistenceException pe) {
+ log.warn("PersistenceException while handling POST "
+ + request.getResource().getPath() + " with "
+ + operation.getClass().getName(), pe);
+
htmlResponse.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"invalid POST
request");
Review comment:
Regarding your request to make the exception handling in the Sling Post
Servlet more specific: I don't plan to do that right now, because I don't have
that requirement. And without an understanding what I want to achieve with it,
the implementation will most likely be not that, what someone else might need
(or not).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]