File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
services/web/server/src/simcore_service_webserver/wallets Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1919)
2020from servicelib .aiohttp .typing_extension import Handler
2121from servicelib .error_codes import create_error_code
22- from servicelib .logging_utils import get_log_record_extra
22+ from servicelib .logging_utils import LogExtra , get_log_record_extra
2323from servicelib .request_keys import RQT_USERID_KEY
2424
2525from .._constants import RQ_PRODUCT_KEY
@@ -90,17 +90,16 @@ async def wrapper(request: web.Request) -> web.StreamResponse:
9090
9191 except BillingDetailsNotFoundError as exc :
9292 error_code = create_error_code (exc )
93- log_extra = {}
93+ log_extra : LogExtra = {}
9494 if user_id := getattr (exc , "user_id" , None ):
9595 log_extra = get_log_record_extra (user_id = user_id ) or {}
9696
97+ log_msg = f"{ exc } [{ error_code } ]"
9798 _logger .exception (
98- "%s [%s]" ,
99- f"{ exc } " ,
100- f"{ error_code } " ,
99+ log_msg ,
101100 extra = {"error_code" : error_code , ** log_extra },
102101 )
103- user_msg = MSG_BILLING_DETAILS_NOT_DEFINED_ERROR + f" ({ error_code } )"
102+ user_msg = f" { MSG_BILLING_DETAILS_NOT_DEFINED_ERROR } ({ error_code } )"
104103 raise web .HTTPServiceUnavailable (reason = user_msg ) from exc
105104
106105 return wrapper
You can’t perform that action at this time.
0 commit comments