Skip to content

Commit d7f55aa

Browse files
committed
cleanup
1 parent 8ac1c97 commit d7f55aa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ def _handle_http_error(
124124
# NOTE: aiohttp.HTTPException creates `text = f"{self.status}: {self.reason}"`
125125
user_error_msg = exception.text or "Unexpected error"
126126

127-
error_code = None
127+
error_code: IDStr | None = None
128128
if is_5xx_server_error(exception.status):
129-
error_code = _log_5xx_server_error(request, exception, user_error_msg)
130-
error_code = IDStr(error_code)
129+
error_code = IDStr(
130+
_log_5xx_server_error(request, exception, user_error_msg)
131+
)
131132

132133
error_model = ErrorGet(
133134
errors=[

0 commit comments

Comments
 (0)