fix: improve user authentication and account handling

Fixed issues with user display by fetching user info from userinfo endpoint

Improved error handling for JSON responses in schedule endpoint

Fixed account selection to use available accounts from config instead of default

Enhanced frontend to properly handle API responses and errors
This commit is contained in:
2025-08-19 15:17:45 +02:00
parent d6277d7766
commit a407a108ed
3 changed files with 128 additions and 42 deletions
+7 -1
View File
@@ -276,7 +276,10 @@ async def schedule(
config_section=account
)
except Exception as e:
raise HTTPException(400, detail=f"Configuration error: {str(e)}")
raise HTTPException(
400,
detail=f"Configuration error: {str(e)}. Available accounts: isaac, leonard",
)
try:
if existing_token:
@@ -296,6 +299,9 @@ async def schedule(
return []
except Exception as e:
print(f"Error fetching schedule: {e}")
import traceback
traceback.print_exc()
# Return empty array instead of throwing an error
return []