HTTP Status Code 400 Still Retries Request, Contrary to Documentation
Hello Hubspot Dev Community,
I am working with the Webhooks API to create a service where I do not want the service to attempt re-sending failed notifications.
According to Hubspot documentation, this can be accomplsihed if the service responds with an HTTP status code that has a status code of 400:
Retries
If your service has problems handling notifications at any time, we will attempt to re-send failed notifications up to 10 times.
We will retry in the following cases:
Connection failed - If we cannot open an http connection to the provided webhook URL
Timeout - If your service takes longer than 2 second to send back a response to a batch of notifications
Error codes - If your service responds with an HTTP status code that is not one of: 400, 401, 403, 404, 405
Retries will occur with an exponential backoff based on the next attemptNumber. So the first retry will happen in 2 seconds, the second retry in 4 seconds, the third retry in 8 seconds, etc.
However, I am still getting retries even with a 400 status. See screenshot below:
Is this a known defect? Or is there a different best practice to not trigger a retry on failure?
Thanks for bringing this up. I've gone ahead and taken this to my team for further investigation. I'll work with them and reach back out to you here on this forum thread with more information.
Thanks for your patience here, I didn't update this thread. I've taken this to my team, and it does appear that the Webhook API retry logic isn't respecting the documented error codes. The team is working on a fix for this now, but given the widespread effects of changing webhook retry behavior it's something the team is moving forward with carefully.
I'll post any updates here on this forum post: In the interim, feel free to reach out with any questions!