File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
api-server/src/simcore_service_api_server/api/routes
payments/src/simcore_service_payments/api/rest Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -279,8 +279,6 @@ async def get_solver_pricing_plan(
279279 pricing_plan_or_none = await webserver_api .get_service_pricing_plan (
280280 solver_key = solver_key , version = version
281281 )
282-
283- # TODO: raise if None!! Check with MB
284- assert pricing_plan_or_none
285-
282+ # NOTE: pricing_plan_or_none https://github.com/ITISFoundation/osparc-simcore/issues/6901
283+ assert pricing_plan_or_none # nosec
286284 return pricing_plan_or_none
Original file line number Diff line number Diff line change 66 PaymentMethodNotFoundError ,
77 PaymentNotFoundError ,
88)
9+ from servicelib .logging_errors import create_troubleshotting_log_kwargs
910from servicelib .logging_utils import log_context
1011
1112from ..._constants import ACKED , PGDB
@@ -77,9 +78,22 @@ async def acknowledge_payment(
7778 )
7879
7980 if ack .saved :
80- if ack .saved .payment_method_id is None :
81- _logger .error ("Failed to " ) # failed to save create-card
82- # TODO: notify failure to save !
81+ if ack .saved .payment_method_id is None or not ack .saved .success :
82+ _logger .error (
83+ ** create_troubleshotting_log_kwargs (
84+ f"Got ack that { payment_id = } was completed but failed to save the payment-method used for the payment as requested." ,
85+ error = RuntimeError ("Failed to save payment-method after payment" ),
86+ error_context = {
87+ "ack" : ack ,
88+ "user_id" : transaction .user_id ,
89+ "payment_id" : payment_id ,
90+ "transaction" : transaction ,
91+ },
92+ tip = "This issue is not critical. Since the payment-method could not be saved, "
93+ "the user cannot use it in following payments and will have to re-introduce it manually"
94+ "SEE https://github.com/ITISFoundation/osparc-simcore/issues/6902" ,
95+ )
96+ )
8397 else :
8498 inserted = await payments_methods .insert_payment_method (
8599 repo = repo_methods ,
You can’t perform that action at this time.
0 commit comments