Check for error path as well. (#1863)
Check for error path as well. (#1863)

Adding the check here seems to get out of things early enough and triggers `next()` so that things can continue.  My local test sites go back to working.
gatsbyjs/gatsby,0x80/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,fk/gatsby,mickeyreiss/gatsby,danielfarrell/gatsby,chiedo/gatsby,danielfarrell/gatsby,chiedo/gatsby,fabrictech/gatsby,0x80/gatsby,mingaldrichgan/gatsby,fabrictech/gatsby,mingaldrichgan/gatsby,fk/gatsby,mingaldrichgan/gatsby,Khaledgarbaya/gatsby,danielfarrell/gatsby,Khaledgarbaya/gatsby,gatsbyjs/gatsby,fk/gatsby,0x80/gatsby,chiedo/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,ChristopherBiscardi/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,ChristopherBiscardi/gatsby,mickeyreiss/gatsby,Khaledgarbaya/gatsby,gatsbyjs/gatsby,fabrictech/gatsby