Hi,

I'm coming late to this discussion, with a smallish thing..

On Wed, Nov 11, 2020 at 1:10 PM Jörg Hoh <jhoh...@googlemail.com.invalid> wrote:
> ...Having that in mind, I would nevertheless argue to switch the behavior of
> the SlingPostServlet to return a 405 "Method not allowed" in the case of a
> PersistenceError [2]...

I would much prefer a 409 "Conflict" status which as per rfc7231
indicates "a conflict with the current state of the target resource"
where "the user might be able to resolve the conflict and resubmit the
request."

I think it's suitably vague, whereas 405 is meant for when the HTTP
method used is not appropriate, which is not the problem here IMO.

Also, 405 is indicated to be cacheable by default which is probably
not what we want here.

-Bertrand

> [2]
> https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java#L237

Reply via email to