Skip to content

Commit

Permalink
fixup! Encapsulated error handling (fastify#3261)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejostir committed Nov 14, 2021
1 parent 795e83a commit 2dbc4fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/error-handler.js
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 2dbc4fb

Please sign in to comment.