Selaa lähdekoodia

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

GitOrigin-RevId: 458f712452241771dff99977e638a3f4d2c113fa
Kristina 10 kuukautta sitten
vanhempi
sitoutus
d6f2dfd8b1
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      services/web/app/src/Features/Subscription/Errors.js

+ 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,
 }