Skip to content

Commit a55e85b

Browse files
committed
raises unavailable
1 parent 39f310a commit a55e85b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

services/payments/src/simcore_service_payments/_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
RUT: Final[str] = "Resource Usage Tracker service"
77

88

9-
MSG_GATEWAY_UNAVAILABLE_ERROR = "Our payments provider is temporary unavailable"
9+
MSG_GATEWAY_UNAVAILABLE_ERROR = "Our payments provider is temporary innoperative"

services/payments/src/simcore_service_payments/services/payments_gateway.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _reraise_as_service_errors_context(operation_id: str):
9090
except httpx.RequestError as err:
9191
_logger.exception("%s: request error", PAG)
9292
raise PaymentServiceUnavailableError(
93-
human_reason=MSG_GATEWAY_UNAVAILABLE_ERROR
93+
human_readable_detail=MSG_GATEWAY_UNAVAILABLE_ERROR
9494
) from err
9595

9696
except httpx.HTTPStatusError as err:
@@ -106,7 +106,7 @@ def _reraise_as_service_errors_context(operation_id: str):
106106
# 5XX in server -> turn into unavailable
107107
_logger.exception(error.get_detailed_message())
108108
raise PaymentServiceUnavailableError(
109-
human_reason=MSG_GATEWAY_UNAVAILABLE_ERROR
109+
human_readable_detail=MSG_GATEWAY_UNAVAILABLE_ERROR
110110
) from err
111111

112112

services/payments/tests/unit/test_rpc_payments.py

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ async def test_rpc_init_payment_fail(
9898
timeout_s=None if is_pdb_enabled else 5,
9999
)
100100

101-
# FIXME: should raise
102101
assert isinstance(exc_info.value, PaymentServiceUnavailableError)
103102

104103

0 commit comments

Comments
 (0)