Skip to content

Commit 3e65035

Browse files
committed
Specify exception class to be caught
1 parent 8a4ab31 commit 3e65035

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

instana/django.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def process_request(self, request):
3535
span.set_tag(ext.HTTP_METHOD, request.method)
3636
span.set_tag("http.host", env['HTTP_HOST'])
3737
self.span = span
38-
except as e:
38+
except Exception as e:
3939
logger.debug("Instana middleware @ process_response: ", e)
4040

4141
def process_response(self, request, response):
@@ -51,7 +51,7 @@ def process_response(self, request, response):
5151
internal_tracer.inject(self.span.context, ot.Format.HTTP_HEADERS, response)
5252
self.span.finish()
5353
self.span = None
54-
except as e:
54+
except Exception as e:
5555
logger.debug("Instana middleware @ process_response: ", e)
5656
finally:
5757
return response

0 commit comments

Comments
 (0)