mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 19:06:27 +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) {
|
this._onRequest(params, function (err, response) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.emit('warning', new Error(err.message))
|
self.emit('warning', err)
|
||||||
response = {
|
response = {
|
||||||
'failure reason': err.message
|
'failure reason': err.message
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ Server.prototype._onUdpRequest = function (msg, rinfo) {
|
|||||||
// Handle
|
// Handle
|
||||||
this._onRequest(params, function (err, response) {
|
this._onRequest(params, function (err, response) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.emit('warning', new Error(err.message))
|
self.emit('warning', err)
|
||||||
response = {
|
response = {
|
||||||
action: common.ACTIONS.ERRROR,
|
action: common.ACTIONS.ERRROR,
|
||||||
'failure reason': err.message
|
'failure reason': err.message
|
||||||
|
Loading…
Reference in New Issue
Block a user