Skip to content

Commit 30eebd2

Browse files
authored
Refactor _handle_exception method for Falcon 3
1 parent eb5d192 commit 30eebd2

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

  • instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,7 @@ def __del__(self):
328328
if self in _InstrumentedFalconAPI._instrumented_falcon_apps:
329329
_InstrumentedFalconAPI._instrumented_falcon_apps.remove(self)
330330

331-
<<<<<<< fix/falcon-handle-exception-pylint-4198
332331
if _falcon_version == 1:
333-
=======
334-
def _handle_exception(self, arg1, arg2, arg3, arg4): # pylint: disable=C0103,W0237
335-
# Falcon 3 does not execute middleware within the context of the exception
336-
# so we capture the exception here and save it into the env dict
337-
>>>>>>> main
338332

339333
def _handle_exception(self, ex, req, resp, params):
340334
# Falcon 3 does not execute middleware within the context
@@ -346,12 +340,7 @@ def _handle_exception(self, ex, req, resp, params):
346340
_, exc, _ = exc_info()
347341
req.env[_ENVIRON_EXC] = exc
348342

349-
<<<<<<< fix/falcon-handle-exception-pylint-4198
350343
return super()._handle_exception(ex, req, resp, params)
351-
=======
352-
if _falcon_version == 1:
353-
return super()._handle_exception(ex, req, resp, params) # pylint: disable=W1114
354-
>>>>>>> main
355344

356345
else:
357346

0 commit comments

Comments
 (0)