Commit 51329241 authored by Tony Butler's avatar Tony Butler
Browse files

Merge branch 'removeRequestErrorHandlers' into 'master'

Remove Request Error Handlers

Closes #123

See merge request kado/kado!347
parents 6a30efb8 704eb0f0
Pipeline #12084 passed with stage
in 4 minutes and 41 seconds
......@@ -144,17 +144,7 @@ class HyperTextServer extends HyperTextEngine {
return this.router
}
onRequest (req, res) {
req.on('error', (err) => {
console.error('Request Error', err)
res.statusCode = 400
res.end(`Invalid ${req.method} request on ${req.url}`)
})
res.on('error', (err) => {
console.error('Response Error', err)
})
return this.getRouter().request(req, res)
}
onRequest (req, res) { return this.getRouter().request(req, res) }
static handleRequest (req, res) { return this.onRequest(req, res) }
......
Supports Markdown
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