Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9441

Sling POST servlet responds with 500 if target is not modifiable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • Servlets Post 2.3.36
    • None
    • Servlets
    • None

    Description

      In case a POST is attempted to a node that the request session does not have write access to, the POST servlets throws a 500, e.g.

      04.05.2020 21:34:09.162 *ERROR* [xxx.xxx.xxx.xxx [1588628049158] POST /content/cmo/us/en/home/users/geometrixx/james.devore@spambob.com/fSPiyhliJm HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
      
      org.apache.sling.api.resource.PersistenceException: Unable to create node at /content/cmo/us/en/home/users
      
       at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.create(JcrResourceProvider.java:477) [org.apache.sling.jcr.resource:3.0.20]
      

      Since this is actually a client error I think a 4xx response would be better suited, and make it more obvious that such errors can be safely ignored when doing health monitoring.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chaotic Lars Krapf
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: