Webhooks have empty request/response in call logs

I have a webhook set up for all events on a table. It appears to trigger fine, but in the call logs, it shows as “Not OK” and the request and response boxes are both empty. Looking in the backend logs doesn’t show any errors.

This is a Kubernetes hosted instance.

Also, can we relax the URL validation on webhooks? My intent is to target another service running in k8s, but I had to enable DEBUG mode to allow that.

Thanks

Hi @donlyon, can you share a bit more information about your webhook, perhaps by attaching screenshots from Baserow?

Sure here’s how it’s defined:

And the call log:
Screen Shot 2022-08-19 at 9.32.12 AM

I would add too that the test trigger works fine.

I don’t think your URL address is a valid HTTP endpoint, accepting the request and accessible from the Baserow instance.

I do think the URL is the culprit. I was able to hit a postman mock server without an issue. Any ideas on a workaround? That is a valid URL in this context since it’s directing the webhook to a service address in kubernetes, and I’m running baserow in kubernetes. I had to run it in DEBUG mode to bypass the check when setting up the webhook, but there must be another URL validation when it fires the webhook. I did try different variations of specificity in the URL.

I don’t think we validate the URL after it is saved, so once Baserow allows you to set it up, then I see it as a network issue. You can always SSH to the Baserow backend/celery container and try curl request to your address. I don’t think we can help you much beyond that I am afraid.

I have tested the network call, both with curl from the background service, and with the “Trigger test webhook” button on the webhook setup page. Both work as expected, which leads me to believe there is something different happening during an actual trigger. If there’s anything else I could try to help isolate the issue, please let me know. I’m happy to hack on it as well if you can point me to the likely files.

Sorry for necroposting, but I have found one of the reasons for hitting this strange response data (“NOT OK” without status code and an empty response body). This happens is when the timeout for the webhook response is exceeded. The timeout is configured like so:

BASEROW_WEBHOOKS_REQUEST_TIMEOUT_SECONDS = int(
    os.getenv("BASEROW_WEBHOOKS_REQUEST_TIMEOUT_SECONDS", 5)
)

If your webhook takes over 5 seconds to respond, there is a timeout error and the UI just states not ok.

I would appreciate if the messaging in the user interface was clearer. For example, it could explicitly state “Timeout exceeded” instead of “NOT OK”. Right now, this state is very confusing, because the timeout setting is not explicitly mentioned anywhere in the user interface (at least I couldn’t find it).

Thanks for the feedback, @gaurangtandon. I don’t think it will be a problem to change the messaging. I’ll create an issue on GitLab to address it.