RocketChat/Rocket.Chat · info

Integration result is empty

Error message

Integration result is empty

What it means

The outgoing webhook endpoint answered with an empty body. The handler logs this warn and continues: no JSON is parsed (data stays null) and no reply message is sent, though processOutgoingResponse scripts still see the raw response. For fire-and-forget integrations an empty body is normal and harmless; if you expected the endpoint to return a bot reply, nothing will be posted.

Source

Thrown at apps/meteor/server/lib/integrations/lib/triggerHandler.ts:630

		}

		fetch(
			opts.url,
			{
				method: opts.method,
				headers: opts.headers,
				...(opts.timeout && { timeout: opts.timeout }),
				...(opts.data && { body: opts.data }),
				// SECURITY: Integrations can only be configured by users with enough privileges. It's ok to disable this check here.
				ignoreSsrfValidation: true,
				size: 10 * 1024 * 1024,
			},
			settings.get('Allow_Invalid_SelfSigned_Certs'),
		)
			.then(async (res) => {
				const content = await res.text();
				if (!content) {
					outgoingLogger.warn({ msg: 'Integration result is empty', integrationName: trigger.name, url });
				} else {
					outgoingLogger.info({ msg: 'Integration HTTP status', integrationName: trigger.name, url, status: res.status });
				}

				const data = (() => {
					const contentType = (res.headers.get('content-type') || '').split(';')[0];
					if (!['application/json', 'text/javascript', 'application/javascript', 'application/x-javascript'].includes(contentType)) {
						return null;
					}

					try {
						return JSON.parse(content);
					} catch (_error) {
						return null;
					}
				})();

				await updateHistory({

View on GitHub (pinned to b2c16d5842)

Solutions

  1. If the integration should reply, return a JSON body with 200 and application/json, e.g. {"text": "..."}
  2. If fire-and-forget, ignore the warn - the delivery already succeeded and is recorded in History
  3. Check the integration History entry: httpResult empty at 'after-http-call' confirms the endpoint sent nothing
  4. Verify intermediate proxies are not rewriting responses to empty bodies

Example fix

// before (integration endpoint)
app.post('/hook', (req, res) => {
  handle(req.body); // no response body
});

// after (reply so Rocket.Chat posts a message back)
app.post('/hook', (req, res) => {
  handle(req.body);
  res.status(200).json({ text: 'Received: ' + req.body.text });
});
Defensive patterns

Strategy: fallback

Validate before calling

// In the integration script: treat an empty response as an explicit no-op
// processOutgoingResponse({ response, content }) {
//   if (!content) return false; // nothing to parse, skip the reply
//   return { text: JSON.parse(content).text };
// }

Prevention

When it happens

Trigger: The endpoint returns 200/204 with an empty body: serverless handlers with no explicit return, a proxy stripping bodies, a handler that forgot res.send, or an intentionally silent acknowledgement during retry cycles.

Common situations: Lambda/Cloud Function defaults returning empty on success; nginx misconfigurations; endpoints acknowledging with 204 No Content; 'my integration never replies' investigations that turn out to be empty responses rather than failures.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/6a97bc05d2757dac. Report an issue: GitHub.