Help Debugging 500 Error on Custom Webhook (Supabase Query Failing When Therapist ID Is Invalid?)

Hi all — I’m running into a 500 error when calling a custom webhook in n8n that queries Supabase for a therapist profile based on the therapist ID.

For context:

  • I’m testing locally and have hard-coded a therapist ID in my frontend (built in Bolt).
  • However, when my app calls the /webhook/therapists/profile endpoint, I’m seeing a 500 Internal Server Error.
  • The frontend logs also show that the therapist ID is still coming through as 'non-user' instead of the expected hard-coded value, which is probably causing the Supabase query in n8n to fail.

What I’ve Checked:

  • The frontend is supposed to send a hard-coded therapist ID — but I’m seeing 'non-user' in the logs.
  • n8n’s webhook likely isn’t getting a valid therapist ID, but the current flow returns a 500 error instead of failing gracefully.
  • I want to confirm:

How can I best add error handling in n8n to catch when the input (therapist ID) is invalid or missing, and instead return a 400 response?

the 500 err comes from the supabase node right?
maybe before tht add a node to make sure tht the id is valid and it’s what supabase is expected to receive, if its suppose to receive a string thn make sure it is a string and not a number or null/empty

if it is not valid then send 400 err on the webhook


Supabase node is fine. The “Respond to webhook” node is not transmitting this data back to Bolt.new.

is your code node pinned or not?

on the respond to webhook node, try add options - response code 200

so it will always sends that

hi there, if i help solve your question please mark my answer as the solution @marty1

I have the same problem with the community version (self hosted)
the webhook response seems fine and returns data shows execution is working
but the receiving end gets 500 error.
did you manage to fix this?