This PR changes the excluded exceptions list to allow a mix of exception types and callable functions, so as to allow for more fine-grained filtering of system exceptions.
This covers cases such as Bottle'sHTTPError, where the same exception is used to cover both client errors (HTTP 4xx) and server exceptions (HTTP 5xx). We don't wish to increment the failure counter in cases where we're proxying a request that may cause a client error (e.g. a 404) - hence passing a filter function allows us to differentiate the different uses of this exception type.
This PR changes the excluded exceptions list to allow a mix of exception types and callable functions, so as to allow for more fine-grained filtering of system exceptions.
This covers cases such as Bottle's
HTTPError
, where the same exception is used to cover both client errors (HTTP 4xx) and server exceptions (HTTP 5xx). We don't wish to increment the failure counter in cases where we're proxying a request that may cause a client error (e.g. a 404) - hence passing a filter function allows us to differentiate the different uses of this exception type.