When updating a service via Services API, settings should be tested and an error raised, if necessary
Problem to solve
When invalid settings are supplied through the Services API, no immediate feedback is given.
This behaviour differs from the admin GUI: when the admin enters service settings in the form, they are asked to "test settings and save changes" and if settings are invalid this is highlighted immediately.
- Devon, DevOps Engineer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#devon-devops-engineer
A customer we were supporting encountered this issue when they wanted to automate adding Jira integration to hundreds of projects. They had mistyped the username in the
curl command, did not catch this and were left wondering why the integration did not work.
The customer mentioned that having warning or information about a bad setting would have helped resolve the situation before it became an issue.
Zendesk ticket (internal)
For reference, I have tested sending invalid settings to the Services API (username was incorrect) and this is the response generated:
Just like the GUI, test settings when they are updated through the Services API and return an error if the settings are invalid.
Permissions and Security
What does success look like, and how can we measure that?
An error is returned if settings are invalid.