[hAIk]: added in debug statements instead of printing/logging

This commit is contained in:
haikdc
2026-04-18 07:43:31 -07:00
parent ca2ea81f82
commit d6d6bc2271
20 changed files with 223 additions and 46 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ from fastapi.responses import HTMLResponse, JSONResponse
from backend.config.Apps import SubApp
from backend.apps.subscriptions.NineRouter.NineRouter import NineRouter
from backend.apps.subscriptions.html_constants import SUCCESS_HTML, ERROR_STYLE
from swarm_debug import debug
P_PENDING_OAUTH: Dict[str, dict] = {}
@@ -27,7 +28,7 @@ async def subscriptions_lifespan():
try:
await router.ensure_running()
except Exception as e:
print(f"9Router auto-start failed: {e}")
debug(f"9Router auto-start failed: {e}")
yield
try:
await router.stop()
@@ -156,7 +157,7 @@ async def subscriptions_callback(request: Request):
pending["redirect_uri"], pending["code_verifier"], state,
)
except Exception as e:
print(f"OAuth callback: exchange failed for provider={pending['provider']}: {e}")
debug(f"OAuth callback: exchange failed for provider={pending['provider']}: {e}")
return HTMLResponse(
f'<html><body {ERROR_STYLE}><div style="text-align:center">'
f'<h2>Connection failed</h2><p style="color:#888">{e}</p></div></body></html>'