mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
address greptile review feedback (greploop iteration 3)
- Fix double error handling in getTeamPermissionsCall: return empty data on HTTP error instead of calling handleError + throwing, preventing duplicate error notifications Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
24be81094b
commit
5905100cdc
1 changed files with 2 additions and 3 deletions
|
|
@ -7269,12 +7269,11 @@ export const getTeamPermissionsCall = async (accessToken: string, teamId: string
|
|||
if (!response.ok) {
|
||||
const errorData = await response.json();
|
||||
const errorMessage = deriveErrorMessage(errorData);
|
||||
handleError(errorMessage);
|
||||
throw new Error(errorMessage);
|
||||
console.error("Available permissions fetch failed:", errorMessage);
|
||||
return { all_available_permissions: [], team_member_permissions: [] };
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
console.log("Team permissions response:", data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error("Failed to get team permissions:", error);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue