From 8a660b7a2722ac6339402da492eb02930f7a24bc Mon Sep 17 00:00:00 2001 From: Benjamin ABEL Date: Fri, 2 Nov 2018 15:17:50 +0100 Subject: [PATCH] example-using-remark reject Promise on error (#9633) --- examples/using-remark/gatsby-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/using-remark/gatsby-node.js b/examples/using-remark/gatsby-node.js index 15bedffd703db..c1255bd81446d 100644 --- a/examples/using-remark/gatsby-node.js +++ b/examples/using-remark/gatsby-node.js @@ -33,7 +33,7 @@ exports.createPages = ({ graphql, actions }) => { ` ).then(result => { if (result.errors) { - console.log(result.errors) + return reject(result.errors) } // Create blog posts pages. @@ -68,7 +68,7 @@ exports.createPages = ({ graphql, actions }) => { }) }) - resolve() + return resolve() }) }) }