Skip to content

Commit

Permalink
build: short error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 16, 2019
1 parent 7a092a8 commit f08a9ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const fetch = (url, { toEncode, reflect = false, ...opts }) =>
mode: 'fetch'
})
} catch (err) {
debug('fetch:error', err)
debug('fetch:error', err.message)
debug('fetch:reflect', reflect)
if (reflect) return resolve({ isRejected: true, err })
else resolve({ url, html: '', mode: 'fetch' })
Expand All @@ -88,9 +88,8 @@ const prerender = async (url, { getBrowserless, gotOptions, toEncode, ...opts })
debug('prerender:success')
return { url, html: getHtml(html), mode: 'prerender' }
} catch (err) {
debug('prerender:error', err)
const { isRejected, ...dataProps } = await fetchReq
debug('prerender:error:isRejected?', isRejected)
debug('prerender:error isRejected?', isRejected, err.message)
isFetchRejected = isRejected
fetchDataProps = dataProps
}
Expand Down

0 comments on commit f08a9ee

Please sign in to comment.