mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle IncomingMessage/ServerResponse object types in debug
Fixes #1202
This commit is contained in:
parent
08d21ccba7
commit
301ac279ff
@ -100,6 +100,10 @@ module.exports = function(RED) {
|
||||
var seenAts = [];
|
||||
try {
|
||||
msg.format = msg.msg.constructor.name || "Object";
|
||||
// Handle special case of msg.req/res objects from HTTP In node
|
||||
if (msg.format === "IncomingMessage" || msg.format === "ServerResponse") {
|
||||
msg.format = "Object";
|
||||
}
|
||||
} catch(err) {
|
||||
msg.format = "Object";
|
||||
}
|
||||
@ -116,7 +120,7 @@ module.exports = function(RED) {
|
||||
msg.msg = msg.msg.slice(0,debuglength);
|
||||
}
|
||||
}
|
||||
if (isArray || (msg.format === "Object")) {
|
||||
if (isArray || msg.format === "Object") {
|
||||
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
|
||||
if (key === '_req' || key === '_res') {
|
||||
return "[internal]"
|
||||
|
Loading…
Reference in New Issue
Block a user