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

SlingPostServlet responds with wrong status code upon Oak Access error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Engine
    • None
    • Sling 12
    • Important

    Description

      In Sling 12, the SlingPostServlet sends back a HTTP status 422 Invalid Payload if the underlying OAK persistence layer reports an access error to a resource.

      The correct response code is HTTP 403 Forbidden:

      The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource...

      This is exactly opposite to 422, which indicates that the payload is erroneous. This misleads subsequent debugging efforts. Additionally, this error is not logged with launcher/error.log.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yumeier Juerg Meier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: