Refactor snippet repo path error handling
What does this MR do?
Refs #216273 (closed)
When performing the snippet backfill migration, we check for a specific invalid path error from Gitaly, so that we can handle it appropriately and continue the migration.
This MR refactors that check to be handled within SnippetRepository
which feels like a more logical place to handle it (along with the other errors). This also means that when we then come to re-check for that error in other areas, such as the Create/Update services, we won't need to do the same string comparison in multiple places - we can just check for a PathError
.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by 🤖 GitLab Bot 🤖