Skip to content

Add timeout and curl fallback for feed fetching - #22

Open
lichory wants to merge 2 commits into
zarazhangrui:mainfrom
lichory:fix/prepare-digest-fetch-fallback
Open

Add timeout and curl fallback for feed fetching#22
lichory wants to merge 2 commits into
zarazhangrui:mainfrom
lichory:fix/prepare-digest-fetch-fallback

Conversation

@lichory

@lichory lichory commented Apr 3, 2026

Copy link
Copy Markdown

Summary

  • add a timeout wrapper around native fetch calls in scripts/prepare-digest.js
  • fall back to curl when fetch times out or throws
  • keep the JSON output contract unchanged while improving reliability

Why

In some environments, the GitHub raw feeds are reachable, but Node's native fetch() can hang or fail with fetch failed. That causes prepare-digest.js to error even though the upstream feed is actually available.

This patch makes the skill more robust for gateway, proxy, TLS-sensitive, and scheduled automation environments.

Notes

  • verified locally against the existing feed URLs
  • preserves existing output shape and behavior on successful fetch() paths

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.

1 participant