This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 18266b937 Update documentation about error handlers
18266b937 is described below

commit 18266b9372c5cb83580ade62f05a38bc6b76b6dc
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Jul 13 14:29:02 2023 +0200

    Update documentation about error handlers
---
 .../content/documentation/the-sling-engine/errorhandling.md | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git 
a/src/main/jbake/content/documentation/the-sling-engine/errorhandling.md 
b/src/main/jbake/content/documentation/the-sling-engine/errorhandling.md
index 8291282e5..2f5bdd347 100644
--- a/src/main/jbake/content/documentation/the-sling-engine/errorhandling.md
+++ b/src/main/jbake/content/documentation/the-sling-engine/errorhandling.md
@@ -1,4 +1,4 @@
-title=Errorhandling            
+title=Error Handling
 type=page
 status=published
 tags=core,errorhandling
@@ -17,8 +17,15 @@ working examples of various error handling scenarios.
 
 ## Resetting the Response
 
-Errorhandler scripts and servlets are script with the current response. Before 
setting
-the status and writing to the response such handlers should do the following:
+Before an ErrorHandler is invoked by the Sling Engine, the response is 
resetted. This removes all headers and potentially written content. If the 
response can't be reset, e.g. when it is already partially committed to the 
client, no ErrorHandler will be invoked. In this case the response will be 
committed as-is.
+
+As the response is reset by Sling Engine, an ErrorHandler *must not* reset the 
response again. Especially as there might be error filters being invoked before 
the ErrorHandler.
+
+### Resetting the Respone when using Sling Engine before release 2.15.0
+
+**Note:** This is only relevant when you are using an older version of Sling 
Engine before release 2.15.0
+
+If you are using an older Sling Engine version, an ErrorHandler must reset the 
response and do the following:
 
 * Check whether the response has been committed or not
 * If the response has not been committed:

Reply via email to