Skip to content

Commit 5fa64a5

Browse files
committed
stop passing on user-supplied error handler
This prevents potential side effects, such as logging, to be executed more than once per request handler exception.
1 parent 7ac54ae commit 5fa64a5

File tree

1 file changed

+0
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi

1 file changed

+0
-2
lines changed

instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,6 @@ def build_middleware_stack(self: Starlette) -> ASGIApp:
322322
): # usually true
323323
outer_server_error_middleware = ServerErrorMiddleware(
324324
app=otel_middleware,
325-
handler=inner_server_error_middleware.handler,
326-
debug=inner_server_error_middleware.debug,
327325
)
328326
else:
329327
# Something else seems to have patched things, or maybe Starlette changed.

0 commit comments

Comments
 (0)