Update errors emitted by un/linking project
What does this MR do and why?
Update errors emitted by un/linking project
- use custom error message
- default to old error otherwise
- update tests
Changelog: changed
EE: true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to a project => Secure => Policies
- Apply the following patch
diff --git a/ee/app/assets/javascripts/security_orchestration/components/policies/project_modal.vue b/ee/app/assets/javascripts/security_orchestration/components/policies/project_modal.vue
index 0c6ba9517bd1..ddff2ae87533 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policies/project_modal.vue
+++ b/ee/app/assets/javascripts/security_orchestration/components/policies/project_modal.vue
@@ -79,8 +79,8 @@ export default {
mutation: linkSecurityPolicyProject,
variables: {
input: {
- fullPath: this.namespacePath,
- securityPolicyProjectId: this.selectedProjectId,
+ fullPath: null,
+ securityPolicyProjectId: null,
},
},
});
@@ -113,7 +113,7 @@ export default {
mutation: unlinkSecurityPolicyProject,
variables: {
input: {
- fullPath: this.namespacePath,
+ fullPath: null,
},
},
});
- Try to link a project
- Verify the link error is not the standard one
- Remove the patch, link a project, reapply the patch, try to unlink the project
- Verify the unlink error is not the standard one
Related to #416903 (closed)