only raise a exception for no payment found when the user is a subscriber

This commit is contained in:
Abi Raja 2024-09-12 15:50:01 +02:00
parent 33793051bc
commit 2888893072

View File

@ -188,8 +188,9 @@ async def extract_params(
"auth_token": auth_token,
},
)
sentry_sdk.capture_message("No payment method found")
raise Exception("No payment method found")
if res.status != "not_subscriber":
raise Exception("No payment method found")
# Base URL for OpenAI API
openai_base_url: str | None = None