mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 10:56:25 +00:00
server _onHttpRequest(): don't wrap errors in errors
This commit is contained in:
parent
74d9139049
commit
7a8f9a779f
@ -153,7 +153,7 @@ Server.prototype._onHttpRequest = function (req, res) {
|
||||
|
||||
this._onRequest(params, function (err, response) {
|
||||
if (err) {
|
||||
self.emit('warning', new Error(err.message))
|
||||
self.emit('warning', err)
|
||||
response = {
|
||||
'failure reason': err.message
|
||||
}
|
||||
@ -182,7 +182,7 @@ Server.prototype._onUdpRequest = function (msg, rinfo) {
|
||||
// Handle
|
||||
this._onRequest(params, function (err, response) {
|
||||
if (err) {
|
||||
self.emit('warning', new Error(err.message))
|
||||
self.emit('warning', err)
|
||||
response = {
|
||||
action: common.ACTIONS.ERRROR,
|
||||
'failure reason': err.message
|
||||
|
Loading…
Reference in New Issue
Block a user