Skip to content

fix: prevent process.exit(1) on single user API failure (#61)#66

Open
Akshita-2307 wants to merge 1 commit into
codepvg:mainfrom
Akshita-2307:fix/prevent-process-exit-on-api-failure-issue61
Open

fix: prevent process.exit(1) on single user API failure (#61)#66
Akshita-2307 wants to merge 1 commit into
codepvg:mainfrom
Akshita-2307:fix/prevent-process-exit-on-api-failure-issue61

Conversation

@Akshita-2307
Copy link
Copy Markdown

Summary

Prevents process.exit(1) when a single user's LeetCode API call fails. Instead of terminating the entire sync, failed user fetches are logged and skipped. Fixes #61.

Changes

  • fetchData() now returns null instead of calling process.exit(1) on API error
  • The user processing loop skips users whose API call returned null

@Akshita-2307
Copy link
Copy Markdown
Author

Hi maintainers! This PR fixes issue #61 where a single user API failure causes the entire leaderboard sync to crash via process.exit(1). With this fix, failed users are skipped and syncing continues for remaining users. This makes the sync script resilient to transient API failures. Would appreciate a review. 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.

process.exit(1) on Any Single User's API Failure Destroys Entire Sync Cycle

1 participant