Skip to content

Commit c2d3389

Browse files
committed
cleanup
1 parent f6c7e5d commit c2d3389

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

services/api-server/src/simcore_service_api_server/api/routes/solvers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

services/payments/src/simcore_service_payments/api/rest/_acknowledgements.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
PaymentMethodNotFoundError,
77
PaymentNotFoundError,
88
)
9+
from servicelib.logging_errors import create_troubleshotting_log_kwargs
910
from servicelib.logging_utils import log_context
1011

1112
from ..._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,

0 commit comments

Comments
 (0)