I’m seeing a repeatable issue where a webhooks component in a project builds successfully, and deploys successfully as long as the targetUrl is unchanged, but deploy fails with an internal error only when I change thetargetUrlvalue.
The error shown in the Developer Projects UI is:
“An internal error occurred while upserting webhooks settings. Try again later. If the problem persists, contact HubSpot support.”
Behavior & steps to reproduce
Add the webhooks component to the project.
Run a build in Developer Projects:
Result: Build succeeds.
Deploy the project with targetUrl set to value A (e.g., the URL shown above):
Result: Deploy succeeds. Webhook settings are created as expected.
Update only the settings.targetUrl value to a different HTTPS URL (same domain, different path), B.
Rebuild:
Result: Build still succeeds.
Deploy with targetUrl = B:
Result: Deploy fails with the message:
“An internal error occurred while upserting webhooks settings. Try again later. If the problem persists, contact HubSpot support.”
Change targetUrl back to the original value A.
Rebuild and deploy again:
Result: Build and deploy succeed
I believe this is a platform issue. Can you please check and let me know if there is any possible solution for this case.
Hey @JPaul0 and thanks for reaching out to the HubSpot Community!
This looks like a platform-side bug. The documentation confirms that your webhooks configuration is set up correctly, and there aren’t any restrictions mentioned about changing the targetUrl between deploys.
Here are a few steps you can take next:
- Reach out to HubSpot support directly, as the error message suggests—since this looks like an internal server error rather than a configuration issue.
- When uploading, try running hs doctor and use the --debug flag (hs project upload --debug) to gather extra diagnostic information that can help support troubleshoot with you.
- As a potential workaround, you might delete the webhooks component, deploy without it, then re-add it with the new targetUrl and deploy again.
Hope this helps point you in the right direction! If you have any other questions or run into more issues, feel free to share.
Thanks,
Bérangère This post was created with the assistance of AI tools
Thanks @BérangèreL , Appreciate the help. I am in Free plan. So the hubspot bot sent me to the community :). “hs project --debug” did n’t help, it showed the error response with internal id reference, nothing on what went wrong or alternate action. Anyways, the workaround is what I also had in mind; removing and adding a new webhook with the new “targetUrl”. And it worked as expected and upload was successful :).
Just to give a background:
I was using a test setup url in the targetUrl till now, And now that its ready for production, I changed the targetUrl to the actual production setup url. This was easily editable in the previous versions of the App in the UI screens. Now its made as read-only and on changing it in webhooks.json makes the deploy failed for webhooks alone. So the App is still pointing to my test setup url. I was assuming I could change this Url at the time of publishing but seems i had to recreate webhooks everytime for testing and production separately.
There should be a better way to do this. is n’t it. For now workaround it is :).
Hey @JPaul0, thanks so much for getting back to us and for the background!
I have good news for you! A fix for this was released yesterday, so you should now see clear and actionable error messages instead of just an internal error.
Please try again, and you’ll be able to see helpful details if the issue comes up.
I hope this helps!
Bérangère
Hi @JPaul0,
The issue seems to happen only during deployment when you change the targetUrl, which usually points to a webhook config update issue rather than a build problem.
Things you can try:
Remove and re-add the webhooks component
Remove it from the project, deploy to clear the existing config, then add it back with the new URL and deploy again. This forces a fresh setup instead of updating the existing webhook.
Double-check the new URL
Make sure it is publicly accessible, uses valid HTTPS, returns a 200 response, and does not redirect.
If it still fails, it’s likely a platform-side issue. In that case, I’d open a support ticket and share your project ID and the steps you already tested.
(Taken help from AI)