Skip to content

Add Fallback Handling When Repository URL Is Not Found #37

@naheel0

Description

@naheel0

Description

Currently, when a user pastes a repository URL into ReadmeGenAI and the repository does not exist (invalid URL, typo, deleted repo, or private repo without access), the system does not provide a clear fallback response.

We need to implement proper error handling and display a user-friendly fallback message when the repository cannot be found.

Expected Behavior

  • If the provided GitHub repository URL:
  • Does not exist
  • Is misspelled
  • Returns 404 from GitHub API
  • Is private and inaccessible
  • Has API rate limit issues
  • The system should:
  • Detect the failed API response.
  • Stop README generation.
  • Display a clean fallback UI message such as:
    Repository not found.
    Please check the URL and try again.

Example Scenario

Input:
https://github.com/user/non-existing-repo

  • Current Result:
    Error / no proper feedback
  • Expected Result:
    Friendly fallback message displayed to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendRelated to Next.js API routes or Octokit/GitHub API.area: frontendChanges specifically for the UI/Tailwind components.bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomers
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions