Cannot Delete System Hooks 500 500 Internal Server Error

I want to clean up / remove some unused system hooks in GitLab. I have tried using either the GUI and the Remove button as well as via the API call (below). For many of them I get a 500 Internal Server Error and the hook is not removed… How can I fix this?

curl --request DELETE --header “PRIVATE-TOKEN: (privileged token>)” https://(gitlaburl)/api/v4/hooks/4836


which version of GitLab is involved here? ( gitlaburl/help )

Also, 500 typically leads to a service side error. You should find an error message or stack trace in your server production logs.