Skip to content

Commit 7a8f9a7

Browse files
committed
server _onHttpRequest(): don't wrap errors in errors
1 parent 74d9139 commit 7a8f9a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Server.prototype._onHttpRequest = function (req, res) {
153153

154154
this._onRequest(params, function (err, response) {
155155
if (err) {
156-
self.emit('warning', new Error(err.message))
156+
self.emit('warning', err)
157157
response = {
158158
'failure reason': err.message
159159
}
@@ -182,7 +182,7 @@ Server.prototype._onUdpRequest = function (msg, rinfo) {
182182
// Handle
183183
this._onRequest(params, function (err, response) {
184184
if (err) {
185-
self.emit('warning', new Error(err.message))
185+
self.emit('warning', err)
186186
response = {
187187
action: common.ACTIONS.ERRROR,
188188
'failure reason': err.message

0 commit comments

Comments
 (0)