diff --git a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html
index eb57c122e3ad..e58d746a2d08 100644
--- a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html
+++ b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html
@@ -121,7 +121,7 @@
{{/if}}
diff --git a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js
index 383b5d1ba9bd..9a110dffd58f 100644
--- a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js
+++ b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js
@@ -94,16 +94,12 @@ Template.integrationsOutgoingHistory.helpers({
},
jsonStringify(data) {
- return data ? hljs.highlight('json', JSON.stringify(data, null, 2)).value : '';
- },
-
- hljsStack(errorStack) {
- if (!errorStack) {
+ if (!data) {
return '';
- } else if (typeof errorStack === 'object') {
- return hljs.highlight('json', JSON.stringify(errorStack, null, 2)).value;
+ } else if (typeof data === 'object') {
+ return hljs.highlight('json', JSON.stringify(data, null, 2)).value;
} else {
- return hljs.highlight('json', errorStack).value;
+ return hljs.highlight('json', data).value;
}
},
diff --git a/packages/rocketchat-integrations/server/lib/triggerHandler.js b/packages/rocketchat-integrations/server/lib/triggerHandler.js
index 5012c42e6436..000a1d5af854 100644
--- a/packages/rocketchat-integrations/server/lib/triggerHandler.js
+++ b/packages/rocketchat-integrations/server/lib/triggerHandler.js
@@ -130,7 +130,7 @@ RocketChat.integrations.triggerHandler = new class RocketChatIntegrationHandler
}
if (typeof httpResult !== 'undefined') {
- history.httpResult = httpResult;
+ history.httpResult = JSON.stringify(httpResult, null, 2);
}
if (typeof error !== 'undefined') {