Unclear error from "Emails on push" test when email notifications are disabled
Summary
When "email notifications" are disabled on a project, the "Test settings" of the "Emails on push" integration gives an unclear error message.
Steps to reproduce
- create a project
- in "Settings / General / Visibility, project features, permissions", check the "Disable email notifications" box
- in "Settings / Integrations / Emails on push", enter a test email address
- click "Test settings"
- error message is "Connection failed. Please check your settings."
Example Project
https://gitlab.com/thomasgl-orange/email-on-push/
What is the current bug behavior?
The error message resulting from the settings test is vague/unclear: "Connection failed. Please check your settings."
"Connection failed." sounds like a network error. "Please check your settings." could be anything, from wrong SMTP at the global GitLab level, to invalid recipient email address in the current page. It's really not obvious that, in this case, the problem is an incompatible setting somewhere else in the project configuration.
What is the expected correct behavior?
Correct behavior would be giving a clue about why Email on push does not work. Some ideas:
- at least, include the actual root cause in the error message (something like "Email notifications are disabled on this project.")
- even better, when email notifications are disabled, forbid configuring the Emails on push integration (make the settings page read-only and include a warning on top, or something like that)
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
