File tree 2 files changed +7
-1
lines changed
services/web/server/src/simcore_service_webserver
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 4
4
PaymentMethodNotFoundError ,
5
5
PaymentMethodUniqueViolationError ,
6
6
PaymentNotFoundError ,
7
+ PaymentServiceUnavailableError ,
7
8
)
8
9
from pydantic .errors import PydanticErrorMixin
9
10
13
14
"PaymentMethodNotFoundError" ,
14
15
"PaymentMethodUniqueViolationError" ,
15
16
"PaymentNotFoundError" ,
17
+ "PaymentServiceUnavailableError" ,
16
18
)
17
19
18
20
Original file line number Diff line number Diff line change 31
31
PaymentMethodNotFoundError ,
32
32
PaymentMethodUniqueViolationError ,
33
33
PaymentNotFoundError ,
34
+ PaymentServiceUnavailableError ,
34
35
PaymentUniqueViolationError ,
35
36
)
36
37
from ..products .errors import ProductPriceNotDefinedError
@@ -67,11 +68,14 @@ async def wrapper(request: web.Request) -> web.StreamResponse:
67
68
) as exc :
68
69
raise web .HTTPConflict (reason = f"{ exc } " ) from exc
69
70
71
+ except PaymentServiceUnavailableError as exc :
72
+ raise web .HTTPServiceUnavailable (reason = f"{ exc } " ) from exc
73
+
70
74
except WalletAccessForbiddenError as exc :
71
75
raise web .HTTPForbidden (reason = f"{ exc } " ) from exc
72
76
73
77
except ProductPriceNotDefinedError as exc :
74
- raise web .HTTPConflict (reason = MSG_PRICE_NOT_DEFINED_ERROR )
78
+ raise web .HTTPConflict (reason = MSG_PRICE_NOT_DEFINED_ERROR ) from exc
75
79
76
80
return wrapper
77
81
You can’t perform that action at this time.
0 commit comments