Fix default BACKEND_URL port from 8001 to 8000 for production
Change hardcoded default backend URL from development port (8001) to production port (8000) in Telegram bot API client. This fixes the issue where Telegram bot would try to connect to wrong port when BACKEND_URL environment variable is not properly loaded from .env file, causing "Cannot connect to backend" errors during account linking. Root cause: When .env file is not loaded correctly by Windows Service, the code falls back to the hardcoded default value which was incorrectly set to the development port 8001 instead of production port 8000. Changes: - reports-app/telegram-bot/app/api/client.py: Change default from 8001 to 8000 - Add comment explaining this is for production deployment This ensures the bot connects to the correct backend port even if .env configuration has issues during service startup on Windows Server. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,8 @@ from httpx import AsyncClient, Response, HTTPError, ConnectError
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Backend configuration from environment
|
||||
BACKEND_URL = os.getenv("BACKEND_URL", "http://localhost:8001")
|
||||
# Default to port 8000 (production) instead of 8001 (development)
|
||||
BACKEND_URL = os.getenv("BACKEND_URL", "http://localhost:8000")
|
||||
REQUEST_TIMEOUT = float(os.getenv("API_TIMEOUT", "30.0")) # 30 seconds default
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user