APIs & Integrations

JCabataña
Member

Webhook for Deals

SOLVE

Hi, why am I getting this error message for Webhooks? I tested my endpoint using Postman and it worked — I was able to receive JSON data. However, when it comes to HubSpot Deal creation, I get the following error response. Any ideas on what might be causing this?

{
"success": {
"statusCode": 417
},
"fail": null
}

0 Upvotes
1 Accepted solution
ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Webhook for Deals

SOLVE

Hi @JCabataña ,

That "417 Expectation Failed" error you're seeing usually means HubSpot is sending a request with a header your server isn’t expecting, specifically the "Expect: 100-Continue"  header.


So why does this happen?
When HubSpot sends a webhook, it may include the "Expect: 100-Continue"  header. This is totally normal, but some servers or proxies don’t know how to handle it and just reject the request, which leads to the 417 error.

When you test the same endpoint in Postman, it works fine because Postman usually doesn’t send that header at all.

Here’s how you can fix it:

  • Update your server to either ignore or handle the "Except" header.
    • In Node.js/Express, you can add middleware to bypass or process it.
    • In .NET, you can turn off the expectation check.
  • If you're running behind a proxy or load balancer, make sure it’s not blocking or misinterpreting that header either.

A few other things to double-check:

  • Make sure your webhook URL is publicly accessible and secured with HTTPS.
  • The endpoint shouldn’t require any extra headers or authentication that HubSpot doesn’t send.
  • And just in case, make sure your HubSpot app or workflow has the right webhook permissions set up.

Here are a few links you can check-
https://developers.hubspot.com/docs/api/webhooks

https://community.hubspot.com/t5/APIs-Integrations/Deal-created-webhooks-not-firing/m-p/1098269/high...

https://community.hubspot.com/t5/APIs-Integrations/Webhook-URL-fails-SubscriptionWebhookErrorCategor...

https://stackoverflow.com/questions/566437/http-post-returns-error-417-expectation-failed

https://sitechecker.pro/what-is-417-status-code/

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

View solution in original post

0 Upvotes
2 Replies 2
ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Webhook for Deals

SOLVE

Hi @JCabataña ,

That "417 Expectation Failed" error you're seeing usually means HubSpot is sending a request with a header your server isn’t expecting, specifically the "Expect: 100-Continue"  header.


So why does this happen?
When HubSpot sends a webhook, it may include the "Expect: 100-Continue"  header. This is totally normal, but some servers or proxies don’t know how to handle it and just reject the request, which leads to the 417 error.

When you test the same endpoint in Postman, it works fine because Postman usually doesn’t send that header at all.

Here’s how you can fix it:

  • Update your server to either ignore or handle the "Except" header.
    • In Node.js/Express, you can add middleware to bypass or process it.
    • In .NET, you can turn off the expectation check.
  • If you're running behind a proxy or load balancer, make sure it’s not blocking or misinterpreting that header either.

A few other things to double-check:

  • Make sure your webhook URL is publicly accessible and secured with HTTPS.
  • The endpoint shouldn’t require any extra headers or authentication that HubSpot doesn’t send.
  • And just in case, make sure your HubSpot app or workflow has the right webhook permissions set up.

Here are a few links you can check-
https://developers.hubspot.com/docs/api/webhooks

https://community.hubspot.com/t5/APIs-Integrations/Deal-created-webhooks-not-firing/m-p/1098269/high...

https://community.hubspot.com/t5/APIs-Integrations/Webhook-URL-fails-SubscriptionWebhookErrorCategor...

https://stackoverflow.com/questions/566437/http-post-returns-error-417-expectation-failed

https://sitechecker.pro/what-is-417-status-code/

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

0 Upvotes
JCabataña
Member

Webhook for Deals

SOLVE

Thanks @ArisudanTiwari for the response, i will try

0 Upvotes