diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index 783de3fdc4..5d96cc6347 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -710,7 +710,7 @@ class RequiresBillingAccessTest(ZulipTestCase): # Normal users do not have access self.login(self.example_email('cordelia')) response = self.client_post(url, request_data) - self.assert_json_error_contains(response, "Access denied") + self.assert_json_error_contains(response, "Must be a billing administrator or an organization") # Billing admins have access self.login(self.example_email('hamlet')) diff --git a/zerver/decorator.py b/zerver/decorator.py index 1bf737223c..394aba6eb6 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -139,7 +139,7 @@ def require_billing_access(func: ViewFuncT) -> ViewFuncT: @wraps(func) def wrapper(request: HttpRequest, user_profile: UserProfile, *args: Any, **kwargs: Any) -> HttpResponse: if not user_profile.is_realm_admin and not user_profile.is_billing_admin: - raise JsonableError(_("Access denied")) + raise JsonableError(_("Must be a billing administrator or an organization administrator")) return func(request, user_profile, *args, **kwargs) return wrapper # type: ignore # https://github.com/python/mypy/issues/1927