[gatsby-core-utils] Retry logic on error for fetchRemoteFile #33857
Unanswered
njbmartin
asked this question in
Ideas / Feature Requests
Replies: 1 comment
-
Hi! You can follow #33461 for progress on this and/or help getting this merged :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Preliminary Checks
Description
Getting the following error when downloading image assets from Contentful (using the source plugin):
RequestError: Client network socket disconnected before secure TLS connection was established
When I see this message, it's an instant failure with no retry logic.
I noticed that the old "download retry logic" was replaced with Gatsby's
createRemoteFileNode
, so dug all the way down tofetchRemoteFile
withingatsby-core-utils
, and noticed there wasSTALL_RETRY_LIMIT
andINCOMPLETE_RETRY_LIMIT
, but noERROR_RETRY_LIMIT
.When the responseStream errors, there is no retry logic:
gatsby/packages/gatsby-core-utils/src/fetch-remote-file.ts
Lines 354 to 365 in aa050d7
The workaround was to add retry logic to this:
As for why I'm getting
Client network socket disconnected before secure TLS connection was established
, it's probably something to do with me working inside Docker containers, so not flagging that as a Gatsby issue.Reproduction Link
N/A
Steps to Reproduce
N/A (hard to reproduce)
Expected Result
Any connection errors in
fetchRemoteFile
should at least be retried.Actual Result
Instant build failure
Environment
Config Flags
No response
Beta Was this translation helpful? Give feedback.
All reactions