Re: SlingPostServlet should not throw 500 on any exception

2021-01-07 Thread Robert Munteanu
Hi Joerg, On Wed, 2020-12-23 at 11:25 +0100, Jörg Hoh wrote: > I would love to get some feedback on > https://github.com/apache/sling-org-apache-sling-servlets-post/pull/7 > , so > we can get a fix for my problem committed soon. I had a single comment on the conceptual level, it would be good to

Re: SlingPostServlet should not throw 500 on any exception

2020-12-23 Thread Jörg Hoh
I would love to get some feedback on https://github.com/apache/sling-org-apache-sling-servlets-post/pull/7, so we can get a fix for my problem committed soon. Thanks, Jörg Am Do., 17. Dez. 2020 um 12:54 Uhr schrieb Jörg Hoh : > Thanks Bertrand, I implemented your feedback. > > As my initial

Re: SlingPostServlet should not throw 500 on any exception

2020-12-17 Thread Jörg Hoh
Thanks Bertrand, I implemented your feedback. As my initial implementation was deemed to simple and not covering relevant cases, I created a new PR at https://github.com/apache/sling-org-apache-sling-servlets-post/pull/7 which tries to return a different status code based on various JCR

Re: SlingPostServlet should not throw 500 on any exception

2020-12-14 Thread Bertrand Delacretaz
Hi, I'm coming late to this discussion, with a smallish thing.. On Wed, Nov 11, 2020 at 1:10 PM Jörg Hoh 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]...

Re: SlingPostServlet should not throw 500 on any exception

2020-11-11 Thread Andrei Dulvac
Hi. Strongly agree this should not be a 5xx response. A 4xx makes sense. - Andrei On Wed, 11 Nov 2020 at 14:25, Carsten Ziegeler wrote: > Hi, > > agreed - in many cases we're return a 500 where a 4xx would be more > appropriate. As you mention, the post servlet can't decide which case it >

Re: SlingPostServlet should not throw 500 on any exception

2020-11-11 Thread Carsten Ziegeler
Hi, agreed - in many cases we're return a 500 where a 4xx would be more appropriate. As you mention, the post servlet can't decide which case it is, so we have to map all exceptions either to 500 (like today) or to 4xx. In both cases, we have a false positives. But I agree, that it's more

SlingPostServlet should not throw 500 on any exception

2020-11-11 Thread Jörg Hoh
Hi all, while trying to assess a number of internal server errors, I came across the behavior that the SlingPostServlet is always returning a 500 if it has been invoked and wasn't able to write to the repository because of missing write permissions [2]. See