http: do not return stack trace in errors.

This commit is contained in:
Christopher Jeffrey 2017-03-16 14:20:25 -07:00
parent 1f10bf8253
commit 16dbde4978
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;