Summary
When createRemoteFileNode fails to download the remote file (e.g. 404), it still resolves with an empty fileNode, and writes Failed to process remote content {url} to the console:
|
console.warn(`Failed to process remote content ${task.url}`) |
|
.on(`failed`, () => { |
|
resolve() |
|
}) |
Why not just reject(error) instead of console.warn() & resolve()?
That would make more sense allowing us to handle the error as we wish, and would avoid polluting the terminal.
Relevant information
Environment (if relevant)
System:
OS: macOS 10.14.3
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.6.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.8.0 - /usr/local/bin/npm
Languages:
Python: 2.7.15 - /usr/local/bin/python
Browsers:
Chrome: 72.0.3626.119
Firefox: 65.0.1
Safari: 12.0.3
npmPackages:
gatsby: ^2.1.20 => 2.1.20
gatsby-image: ^2.0.31 => 2.0.31
gatsby-plugin-manifest: ^2.0.21 => 2.0.21
gatsby-plugin-netlify: ^2.0.11 => 2.0.11
gatsby-plugin-offline: ^2.0.24 => 2.0.24
gatsby-plugin-react-helmet: ^3.0.7 => 3.0.7
gatsby-plugin-sharp: ^2.0.24 => 2.0.24
gatsby-plugin-styled-components: ^3.0.6 => 3.0.6
gatsby-plugin-typescript: ^2.0.10 => 2.0.10
gatsby-source-filesystem: ^2.0.23 => 2.0.23
gatsby-transformer-sharp: ^2.1.15 => 2.1.15
npmGlobalPackages:
gatsby-cli: 2.4.12
File contents (if changed)
gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A
Summary
When
createRemoteFileNodefails to download the remote file (e.g. 404), it still resolves with an empty fileNode, and writesFailed to process remote content {url}to the console:gatsby/packages/gatsby-source-filesystem/src/create-remote-file-node.js
Line 126 in a358239
gatsby/packages/gatsby-source-filesystem/src/create-remote-file-node.js
Lines 285 to 287 in a358239
Why not just
reject(error)instead ofconsole.warn()&resolve()?That would make more sense allowing us to handle the error as we wish, and would avoid polluting the terminal.
Relevant information
Environment (if relevant)
File contents (if changed)
gatsby-config.js: N/Apackage.json: N/Agatsby-node.js: N/Agatsby-browser.js: N/Agatsby-ssr.js: N/A