# Changes to Serverless Function Error Responses

**URL:** <https://community.hubspot.com/t/changes-to-serverless-function-error-responses/135652>\
**Category:** Developer Announcements\
**Tags:** announcement\
**Created:** [July 3, 2025, 3:49pm UTC](https://community.hubspot.com/t/changes-to-serverless-function-error-responses/135652 "2025-07-03T15:49:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmclaren](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jmclaren/32/38449_2.png) [@jmclaren](https://community.hubspot.com/u/jmclaren)\
**Post date:** [July 3, 2025, 3:49pm UTC](https://community.hubspot.com/t/changes-to-serverless-function-error-responses/135652/1 "2025-07-03T15:49:52Z")

</div>

This is a reposting of the Developer changelog post: [Changes to Serverless Function Error Responses](https://developers.hubspot.com/changelog/changes-to-serverless-function-error-responses) please refer to that for the most accurate information.  
We are updating the error responses for Serverless Functions to provide more accurate status codes when issues originate from your Serverless Function code. Previously, some Serverless Functions that contained errors in their code were incorrectly returning a `500` status code. This change will help you more accurately diagnose issues with your Serverless Functions and enables more granular error handling.

## **What’s Changing?**

Previously, some errors within Serverless Functions, with the exception of [`429` errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/429), were returning a `500` status code. This could lead to confusion, as [`500` errors](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/500) typically imply a server-side issue possibly with HubSpot’s platform, rather than an issue with your own code.

We are updating the system to ensure that errors originating from **your Serverless Function code** return appropriate `4xx` status codes. This means:

- You will receive a [`4xx` error code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status#client_error_responses) when the issue originates directly from your Serverless Function code.
- The original error message will continue to be returned, allowing you to troubleshoot the specific problem.

This change will help you more clearly distinguish between issues that are caused by your Serverless Function code and issues that are caused by HubSpot’s platform.

## **When is it happening?**

This change will begin rolling out on **October 8, 2025**. It will be rolled out gradually to all accounts.

**Questions or comments?** Join us below.
