Native Telegram Block crashes with unhandled AggregateError

Subject: Bug Report: Native Telegram Block crashes with unhandled AggregateError

Description: The native telegramSendMessage block causes a hard workflow crash when it encounters transient network issues, throwing an unhandled AggregateError. This terminates the workflow immediately, preventing error routing or automatic retries.

Environment:

Platform: MindStudio (Cloud Runner)

Block Type: telegramSendMessage (Native Integration)

Runtime: Node.js v22.15.0 LTS

The Error Log:

Plaintext
Action started on CloudRunnerInstance ID: f8t5j
Sending message…
Error: AggregateError: Error
Steps to Reproduce:

Run a workflow containing a telegramSendMessage block.

Trigger the workflow during a momentary network glitch or DNS resolution failure (common in serverless environments).

Result: The block throws AggregateError and the workflow terminates instantly.

Expected Behavior: The block should catch the error and route to the “Error” path (red handle) so the workflow can attempt a retry.

Technical Analysis (For Engineering): This appears to be an unhandled exception in the underlying Node.js fetch implementation. Since Node 18+, fetch throws an AggregateError when a request fails due to connection issues (like ENOTFOUND or timeouts).

It seems the native integration code is not wrapping the fetch call in a comprehensive try/catch block that handles AggregateError. As a result, the exception bubbles up and crashes the runner instead of returning a failure status to the workflow engine.

Current Workaround: We are forced to replace the native Telegram block with a generic “Send HTTP Request” block to manually handle the API call and catch 500/Connection errors for retry logic.

Hi @aiprofessor,

Thanks for the post!

Could you share the Debugger logs for the failed run? To do that, open the Debugger, select the run, click Share, and reply with the URL:

Please make sure there’s no sensitive data in that run, since the logs will be public.

This instance was sending an informational message to the user

@aiprofessor This looks like some issue connecting to Telegram. Are you able to replicate it consistently? Or was this just a one-off blip?

Hi Sean, absolutely an issue with connecting to telegram with a DNS/Network failure, not a Mindstudio failure per se. It has happened a few times. Hit retry in he debugger and away it goes. Suggested resolution is at least one retry before hard failure

happened again today, hit retry and away it goes. I can workaround by using an https request with a retry but would prefer if the block would do that! the debug has my api key so not keen to share but here is the error. Create/Update Airtable Record

3.16 s

1Action started on CloudRunnerInstance ID: 8z4fv at Jan 27, 2026 12:47:02.664 PM PST2

Resolving variables

3

Resolved Base Id: “appNc67K2F4BdKEdj”

4

Resolved Table Id: “tblOLrTZnrxo9yiPD”

5

Resolved Record Data: ““lLifelabs Oak Bay Wednesday, January 28th, 2026 at 13:55pm””, "“2026-01-27T12:47:01-08:00"”

6

Creating Airtable Record

7

Saving record ID to variable {{newTranscriptRecord}}

8

Airtable record created

9

Action completed

Send Telegram Message

280 ms

1Action started on CloudRunnerInstance ID: 8z4fv at Jan 27, 2026 12:47:05.931 PM PST2

Sending message

3

Resolving variables

4

Sending message: “:white_check_mark: Logged. Analyzing request…”

5

Error: AggregateError: Error

Send Telegram Message

627 ms

1Action started on CloudRunnerInstance ID: gq2n7 at Jan 27, 2026 12:48:16.038 PM PST2

Sending message

3

Resolving variables

4

Sending message: “:white_check_mark: Logged. Analyzing request…”

5

Action completed