Skip to content

Commit b95a199

Browse files
authored
fix(contentful): retry on network errors when checking credentials (#29664)
1 parent eaab2df commit b95a199

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

packages/gatsby-source-contentful/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@contentful/rich-text-react-renderer": "^14.1.2",
1212
"@contentful/rich-text-types": "^14.1.2",
1313
"@hapi/joi": "^15.1.1",
14+
"@vercel/fetch-retry": "^5.0.3",
1415
"axios": "^0.21.1",
1516
"chalk": "^4.1.0",
1617
"common-tags": "^1.8.0",

packages/gatsby-source-contentful/src/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const _ = require(`lodash`)
44
const fs = require(`fs-extra`)
55
const { createClient } = require(`contentful`)
66
const v8 = require(`v8`)
7-
const fetch = require(`node-fetch`)
7+
const fetch = require(`@vercel/fetch-retry`)(require(`node-fetch`))
88
const { CODES } = require(`./report`)
99

1010
const normalize = require(`./normalize`)

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4968,6 +4968,14 @@
49684968
"@graphql-typed-document-node/core" "^3.1.0"
49694969
wonka "^4.0.14"
49704970

4971+
"@vercel/fetch-retry@^5.0.3":
4972+
version "5.0.3"
4973+
resolved "https://registry.yarnpkg.com/@vercel/fetch-retry/-/fetch-retry-5.0.3.tgz#cce5d23f6e64f6f525c24e2ac7c78f65d6c5b1f4"
4974+
integrity sha512-DIIoBY92r+sQ6iHSf5WjKiYvkdsDIMPWKYATlE0KcUAj2RV6SZK9UWpUzBRKsofXqedOqpVjrI0IE6AWL7JRtg==
4975+
dependencies:
4976+
async-retry "^1.3.1"
4977+
debug "^3.1.0"
4978+
49714979
"@verdaccio/[email protected]", "@verdaccio/commons-api@^9.7.1":
49724980
version "9.7.1"
49734981
resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-9.7.1.tgz#816f08eb6cb0dbe345f2546428c837be6804796d"

0 commit comments

Comments
 (0)