diff --git a/lib/error-handler.js b/lib/error-handler.js index 1be85a592c..9bc8d68df7 100644 --- a/lib/error-handler.js +++ b/lib/error-handler.js @@ -4,7 +4,7 @@ const FJS = require('fast-json-stringify') const statusCodes = require('http').STATUS_CODES const wrapThenable = require('./wrapThenable') const { - kReplyHeaders, kReplyNextErrorHandler, kReplyIsRunningOnErrorHook, kReplySent, kReplyHasStatusCode + kReplyHeaders, kReplyNextErrorHandler, kReplyIsRunningOnErrorHook, kReplyHasStatusCode } = require('./symbols.js') const { @@ -122,8 +122,6 @@ function fallbackErrorHandler (error, reply, cb) { reply[kReplyHeaders]['content-type'] = 'application/json; charset=utf-8' reply[kReplyHeaders]['content-length'] = '' + Buffer.byteLength(payload) - reply[kReplySent] = true - cb(reply, payload) }