Skip to content

Commit

Permalink
One way we could handle unplanned loss of network
Browse files Browse the repository at this point in the history
  • Loading branch information
uttrasey committed Feb 11, 2018
1 parent 5720e0a commit 97f3b1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/gatsby-source-contentful/src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ module.exports = async ({ spaceId, accessToken, host, syncToken, cacheDir }) =>
console.log(
`Accessing your Contentful space failed. Perhaps you're offline or the spaceId/accessToken is incorrect.`
)
// TODO perhaps continue if there's cached data? That would let
// someone develop a contentful site even if not connected to the internet.
// For prod builds though always fail if we can't get the latest data.
console.log(
`Try running setting GATSBY_CONTENTFUL_OFFLINE=true to see if we can serve from cache.`
)

process.exit(1)
}

Expand Down

0 comments on commit 97f3b1c

Please sign in to comment.