Skip to content

Commit c02fe6b

Browse files
committed
fix: add error logging in refreshModels catch block
Addresses PR review feedback to improve production debugging.
1 parent c42c03a commit c02fe6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/api/providers/fetchers/modelCache.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@ export const refreshModels = async (options: GetModelsOptions): Promise<ModelRec
225225
)
226226

227227
return models
228-
} catch {
229-
// On error, return existing cache if available (graceful degradation)
228+
} catch (error) {
229+
// Log the error for debugging, then return existing cache if available (graceful degradation)
230+
console.error(`[refreshModels] Failed to refresh ${provider} models:`, error)
230231
return getModelsFromCache(provider) || {}
231232
} finally {
232233
// Always clean up the in-flight tracking

0 commit comments

Comments
 (0)