Skip to content

Conversation

@ZibanPirate
Copy link
Member

@ZibanPirate ZibanPirate commented Aug 1, 2025

  • throw when getting non-OK HTTP responses.
  • deferred project clean up to the end of cron even when project has no repos.
  • correct the SPL-Router project info.
  • Bug fix
  • New feature
  • Other

Copilot AI review requested due to automatic review settings August 1, 2025 16:42
@github-actions github-actions bot added fix api API related changes ( api folder ) labels Aug 1, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds error handling for HTTP fetch requests by checking the response status and throwing errors for non-successful requests. This fixes a bug where non-200 HTTP responses were incorrectly treated as successful operations.

  • Adds response status validation using response.ok
  • Implements error logging for failed requests
  • Throws descriptive errors for failed fetch operations
Comments suppressed due to low confidence (1)

api/src/fetch/service.ts:53

  • [nitpick] The error message could be more informative by including the HTTP status code. Consider changing to: Failed to fetch ${url}: ${response.status} ${response.statusText}
      throw new Error(`Failed to fetch ${url}: ${response.statusText}`);

@github-actions github-actions bot added the repo label Aug 1, 2025
The change updates the project processing logic. Instead of deleting
invalid projects, they are now marked as garbage-collected. Tags and
search indices are only processed after valid repositories are
confirmed.
@github-actions github-actions bot added project Project data Data related changes ( data folder ) labels Aug 1, 2025
@ZibanPirate ZibanPirate requested a review from a team August 1, 2025 20:08
@ZibanPirate ZibanPirate changed the title Add error handling for failed fetch requests improved cron job: handle non-existent repo gracefully Aug 1, 2025
omdxp
omdxp previously approved these changes Aug 1, 2025
@github-project-automation github-project-automation bot moved this to Approved in DzCode i/o Aug 1, 2025
@ZibanPirate ZibanPirate merged commit 64b4005 into main Aug 2, 2025
35 checks passed
@ZibanPirate ZibanPirate deleted the improve-cron-import branch August 2, 2025 10:11
@github-project-automation github-project-automation bot moved this from Approved to Merged in DzCode i/o Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API related changes ( api folder ) data Data related changes ( data folder ) fix project Project repo

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants