-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Description
When wiki generation fails due to an upstream API error (e.g. rate limiting 429), the frontend only shows a generic message:
No valid XML found in response
Please check that your repository exists and is public...
The actual error (in this case 429 Rate Limit) is only visible in the container logs, not surfaced to the user at all. This makes debugging very difficult.
Steps to Reproduce
- Configure an OpenAI-compatible API with rate limits (e.g. 20 RPM)
- Submit a repository for wiki generation
- The parallel requests quickly exhaust the rate limit
- Frontend shows "No valid XML found in response" with no indication of the real cause
Expected Behavior
The actual API error should be surfaced to the user in the UI, e.g.:
- "Rate limit exceeded (429): 每分钟最多20次请求"
- Or at minimum, show that the error is API-related rather than suggesting the repo URL is wrong
Actual Behavior
The error message misleads users into thinking their repository URL or format is wrong, when the real issue is an API error.
Relevant Logs
2026-03-24 07:27:33 - ERROR - Giving up acall(...) after 4 tries
(openai.RateLimitError: Error code: 429 - {'error': {'message': 'RPM limit reached'}})
Suggestion
In websocket_wiki.py, the XML parsing failure should check if the underlying cause was an API error and propagate that to the client instead of the generic XML message.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels