@chevre/domain 20.14.0-alpha.2 → 20.14.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,8 +32,23 @@ exports.ISS_PREFIX = 'https://cognito-idp.ap-northeast-1.amazonaws.com/';
|
|
|
32
32
|
function orderProgramMembership(params, paymentMethodType) {
|
|
33
33
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
var _a, _b, _c;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
let customer;
|
|
36
|
+
try {
|
|
37
|
+
customer = yield repos.person.findById({ userId: String(params.agent.id) });
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
// Not Found: User.をハンドル(2023-03-31~)
|
|
41
|
+
if (error instanceof factory.errors.NotFound) {
|
|
42
|
+
// no op
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (customer === undefined) {
|
|
49
|
+
// Userが存在しなければリトライは不要
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
37
52
|
// issに依存するので存在確認
|
|
38
53
|
const issByCustomer = (_b = (_a = customer.identifier) === null || _a === void 0 ? void 0 : _a.find((p) => p.name === 'iss')) === null || _b === void 0 ? void 0 : _b.value;
|
|
39
54
|
if (typeof issByCustomer !== 'string' || issByCustomer.length === 0) {
|
|
@@ -92,6 +107,10 @@ function orderProgramMembership(params, paymentMethodType) {
|
|
|
92
107
|
=== OfferService.product.ERROR_MESSAGE_ALREADY_REGISTERED) {
|
|
93
108
|
return;
|
|
94
109
|
}
|
|
110
|
+
// Not Found: OwnershipInfos of PaymentCard.をハンドル(2023-03-31~)
|
|
111
|
+
if (error instanceof factory.errors.NotFound && error.entityName === 'OwnershipInfos of PaymentCard') {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
95
114
|
throw error;
|
|
96
115
|
}
|
|
97
116
|
});
|
package/package.json
CHANGED