Skip to content

fix: Prevent autoloader loop crash on individual file fetch errors#917

Merged
EdwardMoyse merged 1 commit into
HSF:mainfrom
lavjeetrai:file-fetch
Jun 2, 2026
Merged

fix: Prevent autoloader loop crash on individual file fetch errors#917
EdwardMoyse merged 1 commit into
HSF:mainfrom
lavjeetrai:file-fetch

Conversation

@lavjeetrai

Copy link
Copy Markdown
Contributor

What changed?

Wrapped the fetchAndEmit(fileUrl) call inside a try/catch block within the directory polling loop.

Why is this needed?

Previously, if a single file failed, the uncaught error would break the entire for loop. This caused the autoloader to completely ignore any remaining new files in that batch.

By isolating the fetch step, a failed file is now safely caught and passed to the onError handler, allowing the loop to continue processing the rest of the files without interruption.

@lavjeetrai

Copy link
Copy Markdown
Contributor Author

@EdwardMoyse can u review this pr when u get time ?

@EdwardMoyse EdwardMoyse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks!

@EdwardMoyse EdwardMoyse merged commit d63513c into HSF:main Jun 2, 2026
2 checks passed
@lavjeetrai

lavjeetrai commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@EdwardMoyse ,Thanks so much for the review and for merging this! I'd love to continue contributing. Are there any specific issues or upcoming features you'd recommend I look at next? Happy to take on something a bit more challenging if you have anything in mind.

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.

2 participants