You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was encountering an issue while trying to set up my 11ty project. When I attempted to run npm start, it takes an extended amount of time to initiate the dev environment, approximately 5 minutes. Upon inspecting the console, I observe a few 'ETIMEDOUT' errors. This is ok, is due to my API being currently offline and expected to remain so for a while.
So my problem was this huge wait time.
Describe the solution you'd like
I would like to be able to provide a timeout for EleventyFetch and maybe even being able to set one on a global level to reduce the build time in this scenarios.
Describe alternatives you've considered
I wrapped my EleventyFetch calls with a Promise.race like this:
consttimeoutPromise=newPromise((_,reject)=>{setTimeout(()=>{reject(newError("Timeout: API took to long"));},2500);});
I posted this as a problem into the 11ty discord server (Title: EleventyFetch problem, very long await for API response) and a few users told me that it would be good to have something like this built into EleventyFetch, and proposed me to open a feature request, so here I am. Also I reviewed the others feature request to see if there was already one or similar, but I didn't spotted it. I am writing this into 11ty-Project and not 11ty-Fetch because this feature form was formatted to receive feature requests and the 11ty-fetch form was not, so it seemed more appropriate to write it here.
If something like this already existed and I have not been able to see it, I am sorry for wasting your time, I tried to look for it and I only found this which was not exactly the same.
Thank you so much for the attention and for 11ty.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I was encountering an issue while trying to set up my 11ty project. When I attempted to run npm start, it takes an extended amount of time to initiate the dev environment, approximately 5 minutes. Upon inspecting the console, I observe a few 'ETIMEDOUT' errors. This is ok, is due to my API being currently offline and expected to remain so for a while.
So my problem was this huge wait time.
Describe the solution you'd like
I would like to be able to provide a timeout for EleventyFetch and maybe even being able to set one on a global level to reduce the build time in this scenarios.
Describe alternatives you've considered
I wrapped my EleventyFetch calls with a Promise.race like this:
Additional context
I posted this as a problem into the 11ty discord server (Title: EleventyFetch problem, very long await for API response) and a few users told me that it would be good to have something like this built into EleventyFetch, and proposed me to open a feature request, so here I am. Also I reviewed the others feature request to see if there was already one or similar, but I didn't spotted it. I am writing this into 11ty-Project and not 11ty-Fetch because this feature form was formatted to receive feature requests and the 11ty-fetch form was not, so it seemed more appropriate to write it here.
If something like this already existed and I have not been able to see it, I am sorry for wasting your time, I tried to look for it and I only found this which was not exactly the same.
Thank you so much for the attention and for 11ty.
The text was updated successfully, but these errors were encountered: