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:
Matthew Howard 2026-09-04 10:59:29 -04:00
parent 1312a16435
commit 84dd8cb39d

View file

@ -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
}