Skip to content

Commit ef82189

Browse files
committed
raise from to make pylint happy
1 parent 2df6b54 commit ef82189

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/service-library/src/servicelib/aiohttp/monitoring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ async def middleware_handler(request: web.Request, handler: Handler):
9595
except web.HTTPServerError as exc:
9696
resp = exc
9797
log_exception = exc
98-
raise resp
98+
raise resp from exc
9999
except web.HTTPException as exc:
100100
resp = exc
101101
log_exception = None
102-
raise resp
102+
raise resp from exc
103103
except asyncio.CancelledError as exc:
104104
resp = web.HTTPInternalServerError(reason=f"{exc}")
105105
log_exception = exc
106-
raise resp
106+
raise resp from exc
107107
except Exception as exc: # pylint: disable=broad-except
108108
resp = web.HTTPInternalServerError(reason=f"{exc}")
109109
resp.__cause__ = exc
110110
log_exception = exc
111-
raise resp
111+
raise resp from exc
112112

113113
finally:
114114
resp_time_secs: float = time.time() - start_time

0 commit comments

Comments
 (0)