Webhooks Retry Logic

Hello Community,

I just created a small serverless application using AWS HttpApi and AWS Lambda and have it called using the Honeycode Webhook feature. Unfortunately, the API is called five times, even if I am responding with a status code 200. I assume that Honeycode is having a retry logic when calling webhooks which causes these multiple requests.

Is there a specific response, I have to send back from my Webhook such that Honeycode doesn't retry calling it?

Currently my response looks simply like this:


    return {
        "isBase64Encoded": False,
        "statusCode": 200,
        "body": json.dumps({"status": "ok"}),
        "headers": {
            "Content-Type": "application/json"
        }
    }

Best regards,
André

Hi André - welcome to the forum and thanks for the question! The webhook block retries an operation in case it doesn't see a response in under 1 second. While I'm not certain that this is what is happening, I suspect that it may be the case. To mitigate this, you can attempt to asynchronously return the response back immediately in the Lambda. You can also see if you can optimize the code so you spend less time processing if your logic needs to complete execution before you can return a response.

Unfortunately, there isn't a response you can send to the webhook to prevent it retrying a failed operation.

If you suspect your lambda is returning in less than a second and the webhook block is still retrying, I recommend that you report an issue using the "Report an issue" button in Honeycode so we can investigate this further.

Hello Rajesh, thanks for the explanation, I was suspecting that the running time of the Lambda may be the issue. Good to know, that I have to optimize for 1 second. Also thank you for pointing me to the "async invocation" article.