Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stripe: Rename @error_handler decorator.
Mateusz Manderac3caa3ecc8f8
diff --git a/corporate/lib/stripe_event_handler.py b/corporate/lib/stripe_event_handler.pyindex df8fee7ed3b..2c6d8ec12ff 100644--- a/corporate/lib/stripe_event_handler.py+++ b/corporate/lib/stripe_event_handler.py@@ -19,7 +19,7 @@ from zerver.models.users import get_active_user_profile_by_id_in_realmbilling_logger = logging.getLogger("corporate.stripe")-def error_handler(+def stripe_event_handler_decorator(func: Callable[[Any, Any], None],) -> Callable[[Union[stripe.checkout.Session, stripe.Invoice], Event], None]:def wrapper(@@ -90,7 +90,7 @@ def get_billing_session_for_stripe_webhook(return RealmBillingSession(user)-@error_handler+@stripe_event_handler_decoratordef handle_checkout_session_completed_event(stripe_session: stripe.checkout.Session, session: Session) -> None:@@ -113,7 +113,7 @@ def handle_checkout_session_completed_event(billing_session.update_or_create_stripe_customer(payment_method)-@error_handler+@stripe_event_handler_decoratordef handle_invoice_paid_event(stripe_invoice: stripe.Invoice, invoice: Invoice) -> None:invoice.status = Invoice.PAIDinvoice.save(update_fields=["status"])