Ver código fonte

[web] fix Stripe concurrent idempotency error (#29007)

GitOrigin-RevId: 458f712452241771dff99977e638a3f4d2c113fa
Kristina 10 meses atrás
pai
commit
d6f2dfd8b1

+ 7 - 0
services/web/app/src/Features/Subscription/Errors.js

@@ -32,6 +32,12 @@ class HasNoAdditionalLicenseWhenManuallyCollectedError extends OError {}
 
 class InvalidTaxIdError extends OError {}
 
+class StripeClientIdempotencyKeyInUseError extends OError {
+  constructor() {
+    super('Stripe idempotency key was already in use')
+  }
+}
+
 /**
  * @typedef {Object} PaymentActionRequiredInfo
  * @property {string} PaymentActionRequiredInfo.clientSecret
@@ -75,4 +81,5 @@ module.exports = {
   HasPastDueInvoiceError,
   HasNoAdditionalLicenseWhenManuallyCollectedError,
   InvalidTaxIdError,
+  StripeClientIdempotencyKeyInUseError,
 }