File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2626api_key_header = APIKeyHeader (name = "api_key" , auto_error = True )
2727
2828if SENTRY_ENABLED :
29+ logging .info ("Starting sentry" )
30+
2931 sentry_sdk .init (
3032 dsn = "https://[email protected] /4505125491703808" ,
3133 # Set traces_sample_rate to 1.0 to capture 100%
3436 traces_sample_rate = 1.0 ,
3537 )
3638
37-
3839app = FastAPI ()
3940g_browser_instance = None
4041
@@ -129,7 +130,7 @@ async def screenshot(request_data: ScreenshotRequest = Body(...)):
129130
130131 buffer = await screenshot_element .screenshot (timeout = DEFAULT_TIMEOUT_MS )
131132 except Exception as e :
132- logger .exception (f"Screenshot generation failed: { e } " )
133+ logger .exception (f"Screenshot generation failed for { url } " )
133134 raise HTTPException (
134135 status_code = 400 , detail = f"Screenshot generation failed: { e } "
135136 )
You can’t perform that action at this time.
0 commit comments