# Throw an error code with Respond To Webhook node

**URL:** <https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761>\
**Category:** Questions\
**Created:** [February 23, 2024, 4:10pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761 "2024-02-23T16:10:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubarseo](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dubarseo](https://community.n8n.io/u/dubarseo)\
**Post date:** [February 23, 2024, 4:10pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/1 "2024-02-23T16:10:47Z")

</div>

Hi there 🙂

I create all my APIs with n8n and it rocks.  
Most of my API are made with a webhook node as a starter, and respond to webhook as a finisher.  
I use a lot of HTTP nodes to.  
Sometimes my API Calls fails.  
Then i use “continue - error output” parameters, and use again a respond to webhook node to send the error back.

My issue is that the respond to webhook node send a 200 with an error.message.  
Is there a way to throw an error with a respond to webhook node ?

(hope this is clear ^^)

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [February 23, 2024, 4:10pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/2 "2024-02-23T16:10:48Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

---

<div class="post-metadata">

**Author:** ![liam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/liam/32/34968_2.png) [@liam](https://community.n8n.io/u/liam)\
**Post date:** [February 23, 2024, 4:19pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/3 "2024-02-23T16:19:21Z")

</div>

Yes, there is a way.

Under the respond to webhook extra options you can specify a specific status code, so you can return 400 or 500 status kits for your case depending on where the issue happened.

I just posted about custom API air handling that checks the parameters and returns custom error codes based on that with a schema. That post is below. Maybe the work flow attached will help you out

> [@Zoho Calendar Community Node](http://community.n8n.io/t/zoho-calendar-community-node/40525/2):
>
> Here is the workflow I will be using the most with this node…and pretty much the whole reason why I made it. This workflow creates your own callable API for creating events with Zoho calendar. This can be called from Zoho integrations including in Deluge script. It can also be called by other n8n workflows using the ‘Execute Workflow’ node. Feel free to reach out to me with any questions Node: I didn’t include webhook auth in this workflow but you should if you use …

---

<div class="post-metadata">

**Author:** ![dubarseo](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dubarseo](https://community.n8n.io/u/dubarseo)\
**Post date:** [February 23, 2024, 4:55pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/4 "2024-02-23T16:55:36Z")

</div>

Sorry for the question, RTFM 😃

Thank you for your help

---

<div class="post-metadata">

**Author:** ![liam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/liam/32/34968_2.png) [@liam](https://community.n8n.io/u/liam)\
**Post date:** [February 23, 2024, 5:27pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/5 "2024-02-23T17:27:41Z")

</div>

No problem and you’re welcome!

---

<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:** [May 23, 2024, 5:28pm UTC](https://community.n8n.io/t/throw-an-error-code-with-respond-to-webhook-node/40761/6 "2024-05-23T17:28:22Z")

</div>

Closed on May 23, 2024, 5:28pm UTC

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