Add a default timeout when fetching
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 166
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
In building the 11ty Bundle website, I use eleventy-fetch to fetch the html of posts. If the site hosting the post is unreachable, the eleventy-build hangs at the point of the fetch. Feel like a bug.
I worked around it by making use of the fetchOption to add a 2 second custom timeout, like so:
fetchOptions: {
signal: AbortSignal.timeout(2000)
},
I'd have rather had a default timeout, but I'm not sure what the default timeout should be.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the fetchOptions handling and the request path responsible for fetching remote assets. Compare the existing AbortSignal.timeout workaround with the library's current behavior, then determine an appropriate default timeout and verify that unreachable hosts no longer leave the fetch hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100