http: do not return stack trace in errors.
This commit is contained in:
parent
1f10bf8253
commit
16dbde4978
@ -1457,7 +1457,7 @@ Response.prototype.error = function error(code, err) {
|
||||
this.send(code, {
|
||||
error: {
|
||||
type: err.type || 'Error',
|
||||
message: err.stack || msg,
|
||||
message: err.message || msg,
|
||||
code: err.code
|
||||
}
|
||||
});
|
||||
@ -1601,7 +1601,7 @@ WebSocket.prototype.onevent = co(function* onevent(packet) {
|
||||
} catch (e) {
|
||||
ack({
|
||||
type: e.type || 'Error',
|
||||
message: e.stack,
|
||||
message: e.message,
|
||||
code: e.code
|
||||
});
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user