temp log more with sentry
This commit is contained in:
parent
f9aa14b566
commit
33793051bc
@ -3,6 +3,7 @@ from dataclasses import dataclass
|
||||
import os
|
||||
from fastapi import APIRouter, WebSocket
|
||||
import openai
|
||||
import sentry_sdk
|
||||
from codegen.utils import extract_html_content
|
||||
from config import (
|
||||
IS_PROD,
|
||||
@ -177,6 +178,17 @@ async def extract_params(
|
||||
await throw_error(
|
||||
"Please subscribe to a paid plan to generate code. If you are a subscriber and seeing this error, please contact support."
|
||||
)
|
||||
import sentry_sdk
|
||||
|
||||
sentry_sdk.set_context(
|
||||
"subscription_check",
|
||||
{
|
||||
"status": res.status,
|
||||
"payment_method": payment_method,
|
||||
"auth_token": auth_token,
|
||||
},
|
||||
)
|
||||
sentry_sdk.capture_message("No payment method found")
|
||||
raise Exception("No payment method found")
|
||||
|
||||
# Base URL for OpenAI API
|
||||
|
||||
Loading…
Reference in New Issue
Block a user