You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flask error handler caching leads to inconsistent behavior #2267
When Flask finds an error handler for a given exception, it caches it in the handler map. This can lead to incorrect behavior for subclasses of the exception.
In this example, we have two exception classes, E1 and E2, and a third exception E that inherits from both. We register error handlers for E2 and Exception. When E is raised, Flask should invoke the E2 error handler as E2 comes before Exception in the MRO of E. But if E1 has been raised in the past, then the Exception error handler will be "cached" as the handler for E1, so that handler will be invoked instead.
changed the title [-]Flask error handler caching behavior leads to inconsistent behavior[/-][+]Flask error handler caching leads to inconsistent behavior[/+]on May 2, 2017
Activity
[-]Flask error handler caching behavior leads to inconsistent behavior[/-][+]Flask error handler caching leads to inconsistent behavior[/+]davidism commentedon May 16, 2017
Related to #1433