Commit 93dbf55
committed
fix: address Daniel's feedback on error handling in embedders
- Remove generic try-catch wrappers that hide actual API errors
- Implement robust error message extraction using error?.message instead of error.toString()
- Add consistent retry behavior for all errors (not just rate limits)
- Update tests to verify new error propagation behavior
- Ensure users see specific error messages (auth failures, rate limits, etc.)
Resolves feedback from PR #44321 parent db66396 commit 93dbf55
File tree
3 files changed
+47
-44
lines changed- src/services/code-index/embedders
- __tests__
3 files changed
+47
-44
lines changedLines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
| |||
124 | 119 | | |
125 | 120 | | |
126 | 121 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 122 | | |
135 | 123 | | |
136 | 124 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
141 | 134 | | |
142 | 135 | | |
143 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
144 | 139 | | |
145 | 140 | | |
146 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
| |||
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
0 commit comments