Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upgrade: Only show generic help error text for card errors.
Aman Agrawal0ef78c793e8b
diff --git a/web/src/billing/upgrade.ts b/web/src/billing/upgrade.tsindex 4ef22c9eb0a..1683f64ab96 100644--- a/web/src/billing/upgrade.ts+++ b/web/src/billing/upgrade.ts@@ -101,11 +101,14 @@ export const initialize = (): void => {helpers.redirect_to_billing_with_successful_upgrade();}},- () => {+ (xhr) => {$("#org-upgrade-button-text").show();$("#org-upgrade-button .upgrade-button-loader").hide();- const error_text = $error_box.text();- $error_box.text(`${error_text} Please fix this issue or use a different card.`);+ // Add a generic help text for card errors.+ if (xhr.responseJSON.error_description === "card error") {+ const error_text = $error_box.text();+ $error_box.text(`${error_text} Please fix this issue or use a different card.`);+ }},);});