Skip to content

Commit c368a2f

Browse files
fix(quart): Fix Quart integration (#3043)
The Quart integration was completely broken prior to this commit, as it caused every request to fail with a 500 error. The reason was that we were using the non-async `ensure_integration_enabled` decorator on the async `sentry_patched_asgi_app` function. This commit fixes the issue by removing the use of that decorator, instead replacing it with a manual check for the integration being enabled. Fixes GH-3040
1 parent aaa8f04 commit c368a2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: sentry_sdk/integrations/quart.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ def patch_asgi_app():
8787
# type: () -> None
8888
old_app = Quart.__call__
8989

90-
@ensure_integration_enabled(QuartIntegration, old_app)
9190
async def sentry_patched_asgi_app(self, scope, receive, send):
9291
# type: (Any, Any, Any, Any) -> Any
92+
if sentry_sdk.get_client().get_integration(QuartIntegration) is None:
93+
return await old_app(self, scope, receive, send)
94+
9395
middleware = SentryAsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))
9496
middleware.__call__ = middleware._run_asgi3
9597
return await middleware(scope, receive, send)

0 commit comments

Comments
 (0)