How do I respond with an error status code?

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?

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

Hi, @diegomoreno :waving_hand: 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