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:
+7
-1
@@ -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 []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user