From b895b87add11647c7181daa4089418f59b121177 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Thu, 26 Aug 2021 20:10:31 +0200 Subject: [PATCH] Errored when creating products if any error occurs refs https://github.com/TryGhost/Team/issues/982 When creating a Product with invalid data for Stripe, e.g. a price of one gazillion dollars - the Stripe API requests would fail, but we would end up with a broken product created in the database. This updates @tryghost/members-api to wrap these calls in a database transaction, and will roll back any operations if one of them fails. --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 16ae6c93bd..98dbb8fad5 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@tryghost/limit-service": "0.6.1", "@tryghost/logging": "0.1.5", "@tryghost/magic-link": "1.0.10", - "@tryghost/members-api": "1.28.0", + "@tryghost/members-api": "1.29.0", "@tryghost/members-csv": "1.1.5", "@tryghost/members-importer": "0.3.1", "@tryghost/members-ssr": "1.0.11", diff --git a/yarn.lock b/yarn.lock index 577115cb75..a27032c941 100644 --- a/yarn.lock +++ b/yarn.lock @@ -908,10 +908,10 @@ jsonwebtoken "^8.5.1" lodash "^4.17.15" -"@tryghost/members-api@1.28.0": - version "1.28.0" - resolved "https://registry.yarnpkg.com/@tryghost/members-api/-/members-api-1.28.0.tgz#97b4ebf826f0b6f34cd6eb4affe8ee77c369a2b6" - integrity sha512-1uEp3D47B+4574UPEhrquyXry6rMN6odl8N8uciu6zXvDDK6SDqnS68EevrerDJyT0nKd8cq4r+JBpr+kcUCfg== +"@tryghost/members-api@1.29.0": + version "1.29.0" + resolved "https://registry.yarnpkg.com/@tryghost/members-api/-/members-api-1.29.0.tgz#147b510b990b19473e170a914983439f2b883695" + integrity sha512-a1R7BO/Q4ZQOyNJ67rJBq9vb3xk5BQYcM6z7XqsryWUnszxSIV2PjKMEcecJNMZiMGBUqURlMq5d3kPkqzloiw== dependencies: "@tryghost/debug" "^0.1.2" "@tryghost/errors" "^0.2.9"