Skip to content

Wiki generation shows 'No valid XML found' without exposing the actual API error #493

@MuLeiSY2021

Description

@MuLeiSY2021

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

  1. Configure an OpenAI-compatible API with rate limits (e.g. 20 RPM)
  2. Submit a repository for wiki generation
  3. The parallel requests quickly exhaust the rate limit
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions