We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c06d26 commit 34e7024Copy full SHA for 34e7024
newrelic/hooks/framework_starlette.py
@@ -252,7 +252,9 @@ def instrument_starlette_middleware_exceptions(module):
252
def instrument_starlette_exceptions(module):
253
# ExceptionMiddleware was moved to starlette.middleware.exceptions, need to check
254
# that it isn't being imported through a deprecation and double wrapped.
255
- if not hasattr(module, "__deprecated__"):
+
256
+ # After v0.45.0, the import proxy for ExceptionMiddleware was removed from starlette.exceptions
257
+ if not hasattr(module, "__deprecated__") and hasattr(module, "ExceptionMiddleware"):
258
259
wrap_function_wrapper(module, "ExceptionMiddleware.__call__", error_middleware_wrapper)
260
0 commit comments