onreqerror: Do not log aborted "errors"
continuous-integration/appveyor/branch AppVeyor build failed Details

master
Jonatan Nilsson 2022-04-02 19:40:46 +00:00
parent 975646d336
commit 3a454d44ce
2 changed files with 3 additions and 5 deletions

View File

@ -612,12 +612,10 @@ export class Flaska {
}
}
this._onreqerror = function(err, ctx) {
if (err.message === 'aborted') {
ctx.log.info(err)
} else {
if (err.message !== 'aborted') {
ctx.log.error(err)
ctx.res.statusCode = ctx.statusCode = 400
}
ctx.res.statusCode = ctx.statusCode = 400
ctx.res.end()
}
this._onreserror = function(err, ctx) {

View File

@ -1,6 +1,6 @@
{
"name": "flaska",
"version": "1.2.1",
"version": "1.2.2",
"description": "Flaska is a micro web-framework for node. It is designed to be fast, simple and lightweight, and is distributed as a single file module with no dependencies.",
"main": "flaska.mjs",
"scripts": {