# How do I respond with an error status code?

**URL:** <https://community.hubspot.com/t/how-do-i-respond-with-an-error-status-code/93759>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [November 10, 2023, 11:50am UTC](https://community.hubspot.com/t/how-do-i-respond-with-an-error-status-code/93759 "2023-11-10T11:50:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegomoreno](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@diegomoreno](https://community.hubspot.com/u/diegomoreno)\
**Post date:** [November 10, 2023, 11:50am UTC](https://community.hubspot.com/t/how-do-i-respond-with-an-error-status-code/93759/1 "2023-11-10T11:50:25Z")

</div>

If I respond to a HubSpot CRM Extensions webhook with an error code (e.g. 40X/5XX), HubSpot does not properly classify the error in the app Monitoring. How do I get HubSpot to log these responses correctly?

 ![diegomoreno_0-1699616825927.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/0/80f09674dee3bdfc9b754047c2700c4639579be5.png)

For some reason, with the appropriate response body, I can get it to appear as both a Succes (check the filter) and an Error.

 ![diegomoreno_1-1699616981359.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/7/37505ff936af79e6003a9c4049dc369e8696cb85.png)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 13, 2023, 11:16pm UTC](https://community.hubspot.com/t/how-do-i-respond-with-an-error-status-code/93759/2 "2023-11-13T23:16:02Z")

</div>

Hi, @diegomoreno 👋 Thanks for sharing. This is interesting and frustrating. Can you share any additional details about how you are responding to the webhook with an error code? The second screenshot is especially fascinating, the failure as a success when using the “Success” filter.

Thanks for the additional information! — Jaycee
