Skip to content

Add a default timeout when fetching #69

@bobmonsour

Description

@bobmonsour

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions