Currently there seems to be no proper way to return a non-200 response on a webhook endpoint.
Ideally you could return a body with a specific http status code, something along the lines of the Response.json() function for remix.
An alternative approach that I think would also be enough and quicker to implement would be to catch all errors being thrown in a webhook handler and just return a 500 back. Lacks the option to explicitly specify the http code, but it allows to at least differentiate between success and error cases for the response
Currently there seems to be no proper way to return a non-200 response on a webhook endpoint.
Ideally you could return a body with a specific http status code, something along the lines of the
Response.json()function for remix.An alternative approach that I think would also be enough and quicker to implement would be to catch all errors being thrown in a webhook handler and just return a 500 back. Lacks the option to explicitly specify the http code, but it allows to at least differentiate between success and error cases for the response