diff --git a/flaska.mjs b/flaska.mjs index b3329ba..1d39093 100644 --- a/flaska.mjs +++ b/flaska.mjs @@ -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) { diff --git a/package.json b/package.json index 5aeac59..8f00ba4 100644 --- a/package.json +++ b/package.json @@ -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": {