add changelog for GH-2986

This commit is contained in:
David Lord 2019-01-07 09:52:54 -08:00
parent b92b2e6c74
commit 662ce2151d
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 22 additions and 8 deletions

View file

@ -1632,6 +1632,16 @@ class Flask(_PackageBoundObject):
registered error handlers and fall back to returning the
exception as response.
.. versionchanged:: 1.0.3
``RoutingException``, used internally for actions such as
slash redirects during routing, is not passed to error
handlers.
.. versionchanged:: 1.0
Exceptions are looked up by code *and* by MRO, so
``HTTPExcpetion`` subclasses can be handled with a catch-all
handler for the base ``HTTPException``.
.. versionadded:: 0.3
"""
# Proxy exceptions don't have error codes. We want to always return
@ -1639,9 +1649,9 @@ class Flask(_PackageBoundObject):
if e.code is None:
return e
# RoutingExceptions such as RequestRedirects are special exceptions
# used to trigger routing actions such as redirects, and also behave
# like proxy exceptions. We return these unchanged as well.
# RoutingExceptions are used internally to trigger routing
# actions, such as slash redirects raising RequestRedirect. They
# are not raised or handled in user code.
if isinstance(e, RoutingException):
return e