sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Sanso (JIRA)" <>
Subject [jira] [Comment Edited] (SLING-7552) SlingPostServlet error handling still insufficient
Date Thu, 24 May 2018 11:31:00 GMT


Antonio Sanso edited comment on SLING-7552 at 5/24/18 11:30 AM:

[~joerghoh] maybe a less invasive solution would be to change the default for {{PostResponseWithErrorHandling}}
to {{true}} see [0]



was (Author: asanso):
[~joerghoh] maybe a less invasive solution would be to change the default for {{PostResponseWithErrorHandling}}
to {{true}} see [0]



> SlingPostServlet error handling still insufficient
> --------------------------------------------------
>                 Key: SLING-7552
>                 URL:
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Post 2.3.24
>            Reporter: Jörg Hoh
>            Priority: Major
>              Labels: patch
>         Attachments: SLING-7552-patch.diff
> At the moment the default errorhandling of Sling [1] cannot be used for errors caused
and handled by the SlingPostServlet itself. It will always return its own custom output without
the chance of customizing it. Although Antonio and Justing worked in SLING-2156 to improve
this situation, it still requires extra work (implementing a PostResponseWithErrorHandling).
It would be better if the output could be customized by the "standard error handling".
> How to reproduce:
>  * create an error handling script in /apps/sling/servlet/errorhandler/default.jsp which
creates some random output.
>  * Validate this script config by doing a request which causes some exception (do not
use the SlingPostServlet here)
>  * Do a POST to the Sling instance which results in an exception (e.g. due to insufficient
>  * The output of the second call is completely determined by the SlingPostServlet, the
default error handling does not kick in.
> Proposed solution:
> * The SlingPostServlet should not swallow the exception and handle it by itself, but
rather re-throw it, so the standard error handling is triggered.
> [1]

This message was sent by Atlassian JIRA

View raw message