Disabled web-hooks cannot be manually tested
Summary
Disabled webhooks cannot be manually tested, and trying to do so causes 500 Internal Server errors
due to NPEs.
This blocks #329849 (closed) since we cannot disable webhooks that users are unable to remediate.
Steps to reproduce
- Turn on the appropriate feature flag:
Feature.enable(:web_hooks_disable_failed) - Set up a failing webhook (e.g. using https://webhook.site or a similar service)
- Cause the hook to be disabled (either permanently with
4xxerrors, or temporarily with5xxerrors). - View the webhook, see that it is disabled
- Follow the the instructions to 'test' the hook. See that testing does not work.
What is the current bug behavior?
Attempts to test failed webhooks result in errors.
What is the expected correct behavior?
Testing a failed hook should send a request, and then either disable or re-enable the hook based on the response.
Output of checks
This bug happens on GitLab.com