This is the expected behavior. A 2xx response is returned from the server if the webhook delivery is successful. Error codes are reserved for delivery failures or catastrophic failures.

You should make use of proper HTTP status codes in order to inform users. You can use codes like 201 or 202 to acknowledge receipt of payload that won’t be processed (for example, a payload delivered by a branch that’s not the default). Reserve the 500 error code for catastrophic failures.

The webhook response does not have any impact on the pull request status. It sounds like perhaps the problem is not with the webhook response, but instead with the fact that a failed validation plugin does not result in Drone making an API call to set the pull request status?