Skip to content

Fix GitHub API project loading error - #91

Open
SakshiKamble08 wants to merge 1 commit into
devvsakib:masterfrom
SakshiKamble08:fix-issue-89
Open

Fix GitHub API project loading error#91
SakshiKamble08 wants to merge 1 commit into
devvsakib:masterfrom
SakshiKamble08:fix-issue-89

Conversation

@SakshiKamble08

@SakshiKamble08 SakshiKamble08 commented Sep 6, 2026

Copy link
Copy Markdown

Description

Fixed the GitHub API project loading error.

Changes

  • Added GitHub API response validation.
  • Added handling for unsuccessful API responses.
  • Prevented errors when the API response is not an array.
  • Added a user-friendly error message when projects cannot be loaded.

Fixes #89

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of unsuccessful API responses and unexpected data formats.
    • Displays an error message in the interface when data cannot be loaded.
    • Prevents invalid data from being processed.

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

@SakshiKamble08 is attempting to deploy a commit to the devvsakib's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9f96fb26-17f9-4a50-8863-4f94dfae4744

📥 Commits

Reviewing files that changed from the base of the PR and between 3baa0e6 and ce361fe.

📒 Files selected for processing (1)
  • script.js

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The project loader now validates GitHub API responses and JSON payloads. It renders a loading error in the page when fetching fails. The project manager also rejects non-array input before iteration.

Changes

Project data validation

Layer / File(s) Summary
API response validation and error rendering
script.js
getData now checks the HTTP status and payload type. Its error handler writes “Unable to load projects” into rowEl.
Project input validation
script.js
manageData now checks for an array and stops before forEach when the input is invalid.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to ce361

Project loading now handles failed or malformed GitHub API responses with a page-level error instead of crashing during rendering. No merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing GitHub API project loading errors.
Linked Issues check ✅ Passed The changes address issue #89 by validating GitHub API responses, handling unsuccessful or invalid payloads, and displaying a user-facing loading error.
Out of Scope Changes check ✅ Passed All described changes support the project-loading error fix and remain within the scope of issue #89.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SakshiKamble08

Copy link
Copy Markdown
Author

Hi @devvsakib,

I have fixed the GitHub API project loading issue (#89) by adding API response validation and error handling.

The changes have been tested locally and the project loads successfully without console errors.

Please review the PR when you get a chance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Project not loading

1 participant