Commit 4318c1d
fix(backend): abort GitLab sync on non-404 API errors to prevent repo deletion
Previously, any HTTP error from the GitLab API (including 500s) was
converted to a warning and the sync continued with a partial repo list.
This caused the database reconciliation to delete repos from the failed
group/user/project. Now only 404 errors are treated as warnings (resource
not found or no access); all other errors abort the sync so the database
is left untouched.
Fixes #1029
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bdab4b7 commit 4318c1d
1 file changed
+9
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | | - | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 137 | + | |
| 138 | + | |
142 | 139 | | |
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
146 | | - | |
| 143 | + | |
147 | 144 | | |
148 | 145 | | |
149 | | - | |
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
| |||
174 | 170 | | |
175 | 171 | | |
176 | 172 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 173 | + | |
| 174 | + | |
180 | 175 | | |
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
184 | | - | |
| 179 | + | |
185 | 180 | | |
186 | 181 | | |
187 | | - | |
188 | 182 | | |
189 | 183 | | |
190 | 184 | | |
| |||
0 commit comments