mirror of https://github.com/Kylart/KawAnime.git
Should be send instead of end
This commit is contained in:
parent
14fe504a4b
commit
29f1e79c6d
4
main.js
4
main.js
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue