Skip to content

Commit

Permalink
fix(contentful): retry on network errors when checking credentials (#…
Browse files Browse the repository at this point in the history
…29664) (#29672)

(cherry picked from commit b95a199)

Co-authored-by: Benedikt Rötsch <axe312ger@users.noreply.github.com>
  • Loading branch information
GatsbyJS Bot and axe312ger committed Feb 23, 2021
1 parent 255b565 commit 2625159
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/gatsby-source-contentful/package.json
Expand Up @@ -11,6 +11,7 @@
"@contentful/rich-text-react-renderer": "^14.1.2",
"@contentful/rich-text-types": "^14.1.2",
"@hapi/joi": "^15.1.1",
"@vercel/fetch-retry": "^5.0.3",
"axios": "^0.21.1",
"chalk": "^4.1.0",
"contentful": "^7.15.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-contentful/src/gatsby-node.js
Expand Up @@ -4,7 +4,7 @@ const _ = require(`lodash`)
const fs = require(`fs-extra`)
const { createClient } = require(`contentful`)
const v8 = require(`v8`)
const fetch = require(`node-fetch`)
const fetch = require(`@vercel/fetch-retry`)(require(`node-fetch`))
const { CODES } = require(`./report`)

const normalize = require(`./normalize`)
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Expand Up @@ -4878,6 +4878,14 @@
"@graphql-typed-document-node/core" "^3.1.0"
wonka "^4.0.14"

"@vercel/fetch-retry@^5.0.3":
version "5.0.3"
resolved "https://registry.yarnpkg.com/@vercel/fetch-retry/-/fetch-retry-5.0.3.tgz#cce5d23f6e64f6f525c24e2ac7c78f65d6c5b1f4"
integrity sha512-DIIoBY92r+sQ6iHSf5WjKiYvkdsDIMPWKYATlE0KcUAj2RV6SZK9UWpUzBRKsofXqedOqpVjrI0IE6AWL7JRtg==
dependencies:
async-retry "^1.3.1"
debug "^3.1.0"

"@verdaccio/commons-api@9.7.1", "@verdaccio/commons-api@^9.7.1":
version "9.7.1"
resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-9.7.1.tgz#816f08eb6cb0dbe345f2546428c837be6804796d"
Expand Down

0 comments on commit 2625159

Please sign in to comment.