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, {
|
this.send(code, {
|
||||||
error: {
|
error: {
|
||||||
type: err.type || 'Error',
|
type: err.type || 'Error',
|
||||||
message: err.stack || msg,
|
message: err.message || msg,
|
||||||
code: err.code
|
code: err.code
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1601,7 +1601,7 @@ WebSocket.prototype.onevent = co(function* onevent(packet) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
ack({
|
ack({
|
||||||
type: e.type || 'Error',
|
type: e.type || 'Error',
|
||||||
message: e.stack,
|
message: e.message,
|
||||||
code: e.code
|
code: e.code
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user