Commit fe77397f authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by GitHub

Make sure internal url always has 200 status code. (#2299)

Even the user set it to something else via custom server api.
parent 7c97cdc7
......@@ -61,12 +61,13 @@ export default class Server {
parsedUrl.query = parseQs(parsedUrl.query)
}
res.statusCode = 200
return this.run(req, res, parsedUrl)
.catch((err) => {
if (!this.quiet) console.error(err)
res.statusCode = 500
res.end(STATUS_CODES[500])
})
.catch((err) => {
if (!this.quiet) console.error(err)
res.statusCode = 500
res.end(STATUS_CODES[500])
})
}
getRequestHandler () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment