# Simulating Errors for Debug Purposes

**URL:** <https://community.n8n.io/t/simulating-errors-for-debug-purposes/123507>\
**Category:** Questions\
**Tags:** core, stop-and-error\
**Created:** [May 29, 2025, 8:16pm UTC](https://community.n8n.io/t/simulating-errors-for-debug-purposes/123507 "2025-05-29T20:16:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a200a200](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@a200a200](https://community.n8n.io/u/a200a200)\
**Post date:** [May 29, 2025, 8:16pm UTC](https://community.n8n.io/t/simulating-errors-for-debug-purposes/123507/1 "2025-05-29T20:16:55Z")

</div>

## Describe the problem/error/question

Hello. I’m new to n8n and come from a coding background. Something I was taught was to handle errors where ever they can occur. I like the n8n feature of being able to send errors through their own output but I’m struggling with debugging/simulating these errors. In some cases there’s an error message - but the errors are always different structures so I can’t just assume there will be like an error key (if an error is sent at all - in some cases like Google Sheets I found the error object will be empty) - further I can’t figure out how to cause some nodes to error in the first place (like the Switch and If nodes, they have the option to error but what is a scenario where these error and how can I simulate it)?

Again, I’m super new to n8n so maybe I’m missing the testing features for power users - if anyone could point me in the right direction it would be greatly appreciated!

## What is the error message (if any)?

N/A

## Please share your workflow

N/A

## Information on your n8n setup

- **n8n version:** 1.94.1
- **Database (default: SQLite):** SQLite
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** default
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** docker
- **Operating system:** ubuntu

---

<div class="post-metadata">

**Author:** ![Antony\_Eardrop](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/antony_eardrop/32/73039_2.png) [@Antony\_Eardrop](https://community.n8n.io/u/Antony_Eardrop)\
**Post date:** [May 29, 2025, 9:32pm UTC](https://community.n8n.io/t/simulating-errors-for-debug-purposes/123507/2 "2025-05-29T21:32:12Z")

</div>

It’s not easy to debug your worflow. But it seems like you’re looking for a **persistent way to handle errors** in your workflows, regardless of which node caused the error.  
Here’s a common approach:

First, create a workflow that is triggered by an error. This workflow will be responsible for handling the error, for example, by sending a notification.  
I usually create the worflow with Error trigger

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/8/580ab54904974e90c413ecdf40fc49bc11f8df31.png)  
To send the errors to my telegram chat  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/b/abd8a4e98ddb5c68863489a1543a62f7a0066bfa.png)

And then set the error workflow in workflow settings (of the workflow you need to debug)  
To do that open the executions and hit the “Which executions is this worflow saving”.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/b/7b3e3dc5324537f677feb4e60a55b716f96617d2.png)  
And then set the Error workflow to the one with Error tirgger  
 ![image](https://europe1.discourse-cdn.com/n8n/optimized/3X/3/4/3490f44c32c23b8668db1ad511503b7035bad5eb_2_690x34.png)

Hope this will helps.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [August 27, 2025, 9:32pm UTC](https://community.n8n.io/t/simulating-errors-for-debug-purposes/123507/3 "2025-08-27T21:32:37Z")

</div>

Closed on August 27, 2025, 9:32pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
