<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 03:47:57 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MAGNOLIA-3595] Add an exception handler for filters.</title>
                <link>https://jira.magnolia-cms.com/browse/MAGNOLIA-3595</link>
                <project id="10000" key="MAGNOLIA">Magnolia</project>
                    <description>&lt;p&gt;There are a few points in the Magnolia filter chain in which it would be really useful to be able to configure an exception handler, that can decide which exception should be rethrown, which can be &quot;resolved&quot; there and which can be just logged or simply ignored (if any).&lt;br/&gt;
First points that come to my mind are the rendering filter (expecially when using &quot;strange&quot; renderers, like spring, stripes or others), the cache filter (see &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-3566&quot; title=&quot;Cache filter should ignore ClientAbortException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-3566&quot;&gt;&lt;del&gt;MAGNOLIA-3566&lt;/del&gt;&lt;/a&gt;) and maybe the servlet filter (expecially when using &quot;strange&quot; servlets).&lt;br/&gt;
It would also be nice if the exception handling class could be injected by filter configuration.&lt;/p&gt;

&lt;p&gt;I don&apos;t know if this is included in the refactoring that you are doing for magnolia 5 or not.&lt;/p&gt;</description>
                <environment></environment>
        <key id="20228">MAGNOLIA-3595</key>
            <summary>Add an exception handler for filters.</summary>
                <type id="2" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10891&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="10000">Won&apos;t Do</resolution>
                                        <assignee username="ochytil">Ondrej Chytil</assignee>
                                    <reporter username="dfghi">Danilo Ghirardelli</reporter>
                        <labels>
                            <label>exception</label>
                            <label>filter</label>
                            <label>handler</label>
                    </labels>
                <created>Fri, 11 Mar 2011 17:42:47 +0100</created>
                <updated>Wed, 4 Nov 2015 15:42:36 +0100</updated>
                            <resolved>Wed, 4 Nov 2015 15:42:36 +0100</resolved>
                                    <version>4.3.8</version>
                    <version>4.4.2</version>
                                                    <component>core</component>
                    <component>templating</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="34279" author="gjoseph" created="Tue, 22 Mar 2011 16:50:33 +0100"  >&lt;p&gt;Do you have other use-cases than &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-3566&quot; title=&quot;Cache filter should ignore ClientAbortException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-3566&quot;&gt;&lt;del&gt;MAGNOLIA-3566&lt;/del&gt;&lt;/a&gt; in mind ? What do you think would be simpler/better,&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;having an exception handler, to be configured per filter, implementing with a method like &lt;tt&gt;handleException(e)&lt;/tt&gt; (probably passing a couple more parameters with it, request and response for instance)&lt;/li&gt;
	&lt;li&gt;extract specific exception handling methods in specific filter, at specific key points - letting you overriding these methods.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The former seems more generic, but also more configuration intensive. The latter might be a little more complex (in the sense that you&apos;d need to know exactly what to override and where), but simpler from a configuration and implementation point of view (the specific exception handling method could have different parameters, base on the use-case)&lt;/p&gt;

&lt;p&gt;I guess finding a good answer will depend on use-cases... thoughts ?&lt;/p&gt;</comment>
                            <comment id="34283" author="dfghi" created="Tue, 22 Mar 2011 17:16:25 +0100"  >&lt;p&gt;For example, I used spring security in my site: while rendering some templates/paragraphs, spring may check for user authentication and throws one of its exception if user is not logged. The exception thrown is then catched by spring filter (which is just another filter in the Magnolia chain), that stores the current request and redirects the user to the login page. This spring exception is then perfectly normal and happens quite often, but rendering filter logs it no matter what, filling logs with &quot;normal&quot; exception. I suppose there are other cases in which a filter can handle exceptions from other points of the chain.&lt;/p&gt;

&lt;p&gt;Anyway I think the first solution you proposed would be better, adding a default exception handler for all filters, because it I&apos;m not mistaken, most of the filters just do nothing or catch, wrap and rethrow.&lt;/p&gt;

&lt;p&gt;The real problem for me is not the &quot;handling&quot; itself, because it&apos;s easy to add another filter that handles the exceptions the way I want, but the &quot;bubbling&quot; of the exception, to avoid unrequested logging and wrapping (or the suppression of the exception).&lt;br/&gt;
Maybe another solution would be to just wrap any exception for any filter (except maybe the few that can be resolved in the filter or similar) in a &quot;MagnoliaBubblingException&quot; that just passes the chain until a &quot;DeafultExceptionHandlerFilter&quot;, a new filter that should be added near the beginning of the chain.&lt;/p&gt;</comment>
                            <comment id="64687" author="had" created="Fri, 14 Jun 2013 11:40:47 +0200"  >&lt;p&gt;@Ondrej could you please add link to your concept for solving this issue?&lt;/p&gt;</comment>
                            <comment id="64762" author="ochytil" created="Fri, 14 Jun 2013 18:12:14 +0200"  >&lt;p&gt;&lt;a href=&quot;http://wiki.magnolia-cms.com/display/DEV/Concept+Filter+exception+handler&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.magnolia-cms.com/display/DEV/Concept+Filter+exception+handler&lt;/a&gt;&lt;br/&gt;
And &lt;a href=&quot;https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=shortlog;h=refs/heads/magnolia-4.5.x-MAGNOLIA-3595&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;git branch&lt;/a&gt; with implemented proof of concept.&lt;/p&gt;</comment>
                            <comment id="89513" author="gjoseph" created="Mon, 11 Aug 2014 16:27:36 +0200"  >&lt;p&gt;While looking at the recent CSRF fixes, I figured this could be &lt;em&gt;almost&lt;/em&gt; already implemented via the &lt;tt&gt;SecurityCallbackFilter&lt;/tt&gt; and &lt;tt&gt;HttpClientCallback&lt;/tt&gt;. Granted, naming isn&apos;t great, and maybe we&apos;d want an additional method, such as &lt;tt&gt;boolean accepts(Throwable t)&lt;/tt&gt; on &lt;tt&gt;HttpClientCallback&lt;/tt&gt;, but the logic is really the same !&lt;/p&gt;</comment>
                            <comment id="115641" author="mmuehlebach" created="Wed, 4 Nov 2015 15:42:36 +0100"  >&lt;p&gt;Given the thousands of other issues we have open that are more highly requested, we won&apos;t be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.&lt;br/&gt;
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.&lt;br/&gt;
I&apos;m going to close this to set expectations so the issue doesn&apos;t stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>relation</name>
                                            <outwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="20123">MAGNOLIA-3566</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="21115">MGNLCACHE-48</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="20069">MAGNOLIA-3552</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="20677">MAGNOLIA-3696</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="31323">MAGNOLIA-5113</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>gmail.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 22 Mar 2011 16:50:33 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 15 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dfghi</customfieldvalue>
            <customfieldvalue>had</customfieldvalue>
            <customfieldvalue>gjoseph</customfieldvalue>
            <customfieldvalue>mmuehlebach</customfieldvalue>
            <customfieldvalue>ochytil</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i00vfb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5141</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>