Should be send instead of end

This commit is contained in:
Kylart 2018-03-09 21:23:03 +01:00
parent 14fe504a4b
commit 29f1e79c6d
1 changed files with 2 additions and 2 deletions

View File

@ -85,10 +85,10 @@ function render ({url}, res) {
const handleError = (err) => {
if (err && err.code === 404) {
res.status(404).end('404 | Page Not Found')
res.status(404).send('404 | Page Not Found')
} else {
// Render Error Page or Redirect
res.status(500).end(`<pre>500 | Internal Server Error\n${err.stack}</pre>`)
res.status(500).send(`<pre>500 | Internal Server Error\n${err.stack}</pre>`)
console.error(`error during render : ${url}`)
console.error(err.stack)
}