Skip to content

Commit

Permalink
Update ModelProviderConfigure.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyjeong13 committed Dec 17, 2024
1 parent 5c599d4 commit 41211d1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions ui/admin/app/components/model-providers/ModelProviderConfigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,12 @@ export function ModelProviderConfigureContent({
ModelProviderApiService.revealModelProviderById(modelProviderId),
{
keepPreviousData: true,
// 404 -> no credential found, so don't retry
shouldRetryOnError: (error) => {
if (
error instanceof NotFoundError &&
error.message.toLowerCase().includes("no credential found")
) {
return false;
}
return true;
},
// 404: no credential found = no need to retry
shouldRetryOnError: (error) =>
error instanceof NotFoundError &&
error.message.toLowerCase().includes("no credential found")
? false
: true,
}
);

Expand Down

0 comments on commit 41211d1

Please sign in to comment.