mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: handle validation errors differently for LMStudio vs other embedders
- LMStudio tests expect translation keys for generic errors - Ollama tests expect the actual error message to be preserved - Updated validation-helpers to check embedder type and handle accordingly
This commit is contained in:
parent
cc5920a006
commit
a46cf106b9
1 changed files with 11 additions and 1 deletions
|
|
@ -146,7 +146,17 @@ export function handleValidationError(
|
|||
}
|
||||
}
|
||||
|
||||
// For generic errors, always return the translation key for consistency with tests
|
||||
// For generic errors, check if it's a meaningful error message
|
||||
if (errorMessage && errorMessage !== "Unknown error") {
|
||||
// For LMStudio, we need to return the translation key
|
||||
if (embedderType === "lmstudio") {
|
||||
return { valid: false, error: "embeddings:validation.configurationError" }
|
||||
}
|
||||
// For other embedders, preserve the original error message
|
||||
return { valid: false, error: errorMessage }
|
||||
}
|
||||
|
||||
// Fallback to generic error
|
||||
return { valid: false, error: "embeddings:validation.configurationError" }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue