Skip to content

fix: add error handling for datetime parsing#3074

Closed
JiayangLai wants to merge 1 commit intovinta:masterfrom
JiayangLai:fix/code-quality-improvements
Closed

fix: add error handling for datetime parsing#3074
JiayangLai wants to merge 1 commit intovinta:masterfrom
JiayangLai:fix/code-quality-improvements

Conversation

@JiayangLai
Copy link
Copy Markdown

Summary

  • Add try/except around datetime.fromisoformat() to handle corrupted or unexpectedly formatted cached data gracefully
  • When cached data has invalid fetched_at format, the repo will be re-fetched instead of crashing

Changes

  • website/fetch_github_stars.py: Wrap datetime.fromisoformat() in try/except

Test plan

  • Python syntax verification passed

🤖 Generated with Claude Code

Wrap datetime.fromisoformat() in try/except to handle corrupted
or unexpectedly formatted cached data gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nivekpraht
Copy link
Copy Markdown

nivekpraht commented Apr 19, 2026 via email

@vinta
Copy link
Copy Markdown
Owner

vinta commented Apr 19, 2026

I think it should just throw an exception if the datetime parsing fails. Sorry bro, close.

@vinta vinta closed this Apr 19, 2026
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.

3 participants