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
  • Loading branch information
axe312ger authored Feb 22, 2021
1 parent eaab2df commit b95a199
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
Original file line number Diff line number Diff line change
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",
"common-tags": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-contentful/src/gatsby-node.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -4968,6 +4968,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 b95a199

Please sign in to comment.