mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(credential): check Detail.Error in isCredentialConflictError for consistency
Matches the pattern every other isXNotFoundError classifier in this file already follows.
This commit is contained in:
parent
1312a16435
commit
84dd8cb39d
1 changed files with 7 additions and 0 deletions
|
|
@ -221,6 +221,13 @@ func isCredentialConflictError(errResp ErrorResponse) bool {
|
|||
}
|
||||
}
|
||||
|
||||
// Check Detail.Error field for LiteLLM proxy error format
|
||||
if errResp.Detail.Error != "" {
|
||||
if strings.Contains(errResp.Detail.Error, "Unique constraint failed") && strings.Contains(errResp.Detail.Error, "credential_name") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue