Database Webhook Fails Silently Despite All Checks Passing #36691
|
Hi everyone, The Scenario
My Debugging Checklist (What I've Already Ruled Out) To prove the issue isn't in my application logic, I deployed this minimal test function. The curl test passes with this code, but the database trigger still fails silently. // supabase/functions/enrich-community-post/index.ts console.log("Test function initialized!"); serve(async (req) => { } catch (err) { My Question for the Community I've proven the function works on its own, and I've proven the database should be sending an event. Is there another setting or log I'm missing that could explain this silence? Any guidance on where to look next would be incredibly helpful. |
Replies: 2 comments 1 reply
|
Check the Postgres log for errors. Not sure why you bring up publications as you don't mention realtime here and that is not involved with webhooks. |
|
Just to add a small note for anyone else landing here with silent webhook failures, the net._http_response table Gary mentioned is genuinely useful for debugging these. It stores the actual HTTP response from each pg_net request, so you can see status codes and error messages that don't surface anywhere else in the dashboard. One other thing worth checking if you hit similar issues in the future: the pg_net background worker has a queue, and if something upstream is misconfigured it can silently drop requests. Running SELECT * FROM net._http_response ORDER BY created DESC LIMIT 10; right after an insert will show you whether the request even attempted to go out and what came back. |
Check the Postgres log for errors.
Use the table UI to check the net schema _http_response table to see if there is useful status coming back from pg_net which the webhook uses.
Make sure if your edge function requires a valid JWT in the Authorization header that you have the webhook send that header (option at end).
Not sure why you bring up publications as you don't mention realtime here and that is not involved with webhooks.