joerghoh opened a new pull request #7:
URL: https://github.com/apache/sling-org-apache-sling-servlets-post/pull/7


   This PR is similar to #6 and tries to split the possible reasons of 
exceptions into 2 buckets:
   * Exceptions caused in incorrect/invalid input, where it does not make sense 
to repeat the request with the same set of parameters (matched to HTTP status 
422 "Unprocessable entity")
   * Exceptions caused in an incorrect state of the repo (e.g. where the node 
is locked or checked-out), where it could make sense to repeat the same request 
with the same parameters (matched to HTTP status 409 "Conflict")
   
   But as many JCR operations also throw the generic RepositoryException which 
we cannot map to either of it. For these I would still propose to throw a 
statuscode 405 (as proposed in #6).
   
   An additional vector to consider is security: If we try to expose too 
detailed reasons why an operation failed an attacker can draw conclusions from 
it.
   


----------------------------------------------------------------
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]


Reply via email to