Skip to content

Commit

Permalink
bugfix: fix missing condition to open disconnect modal when backend i…
Browse files Browse the repository at this point in the history
…s down (langflow-ai#2993)

🐛 (App.tsx): Fix logic to correctly display error modal when health data is missing or not "ok"
🔧 (use-get-health.ts): Disable retry option in useGetHealthQuery to prevent unnecessary refetching of health data

(cherry picked from commit ac77cee)
  • Loading branch information
Cristhianzl authored and nicoloboschi committed Jul 30, 2024
1 parent a8ce1ed commit b882be7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default function App() {
message={FETCH_ERROR_MESSAGE}
openModal={
isErrorHealth ||
!healthData ||
(healthData &&
Object.values(healthData).some((value) => value !== "ok"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const useGetHealthQuery: useQueryFunctionType<
const queryResult = query(["useGetHealthQuery"], getHealthFn, {
placeholderData: keepPreviousData,
refetchInterval: 20000,
retry: false,
...options,
});

Expand Down

0 comments on commit b882be7

Please sign in to comment.