Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add timeout handler on FE #3537

Merged
merged 11 commits into from
Aug 26, 2024
Merged

feat: add timeout handler on FE #3537

merged 11 commits into from
Aug 26, 2024

Conversation

Cristhianzl
Copy link
Collaborator

✨ (frontend): Add TimeoutErrorComponent to handle timeout errors in API requests

🔧 (frontend): Add healthCheckTimeout state and setHealthCheckTimeout function to utilityStore for managing timeout errors in API requests

…PI requests

🔧 (frontend): Add healthCheckTimeout state and setHealthCheckTimeout function to utilityStore for managing timeout errors in API requests
@Cristhianzl Cristhianzl self-assigned this Aug 23, 2024
Copy link
Contributor

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request matches with one (or more) enabled whitelist criteria. Pull request validation is skipped.

Last Modified at 23 Aug 24 20:43 UTC

@github-actions github-actions bot added the enhancement New feature or request label Aug 23, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3537.dmtpw4p5recq1.amplifyapp.com

…improve code readability and maintainability

🐛 (use-get-health.ts): fix refetch interval value to use the newly added constant REFETCH_SERVER_HEALTH_INTERVAL for consistency and easier maintenance
📝 (api.tsx): Add createNewError503 function to handle custom 503 errors
📝 (api.tsx): Add AxiosError import for type checking
📝 (api.tsx): Refactor error handling logic for authentication errors
📝 (use-get-health.ts): Add createNewError503 import for custom 503 errors
📝 (use-get-health.ts): Add AxiosError import for type checking
📝 (use-get-health.ts): Refactor error handling logic for server busy status
📝 (index.tsx): Add AxiosError import for type checking
📝 (index.tsx): Add useEffect and useState imports for state management
📝 (index.tsx): Refactor error handling logic for server status and retries
📝 (utilityStore.ts): Add retriesApiRequest state and setRetriesApiRequest function
📝 (axios-error-503.ts): Create function to generate custom 503 error responses
📝 (index.ts): Add retriesApiRequest state and setRetriesApiRequest function to UtilityStoreType
…iRequest functions to clean up code and improve maintainability

🔧 (index.ts): remove unused retriesApiRequest and setRetriesApiRequest types to keep type definitions consistent and up to date
@nicoloboschi nicoloboschi self-requested a review August 26, 2024 15:38
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2024
@Cristhianzl Cristhianzl marked this pull request as ready for review August 26, 2024 17:32
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 26, 2024
…he health check feature. This change introduces a new option `health_check_max_retries` that can be set via environment variable or command line argument to control the maximum number of retries for the health check process.
@Cristhianzl
Copy link
Collaborator Author

@nicoloboschi I added the possibility to add a variable on .env LANGFLOW_HEALTH_CHECK_MAX_RETRIES because of the network variation that ming was talking about

@Cristhianzl Cristhianzl enabled auto-merge (squash) August 26, 2024 20:57
@Cristhianzl Cristhianzl requested review from ogabrielluiz and removed request for ogabrielluiz August 26, 2024 20:57
@Cristhianzl Cristhianzl merged commit a763f57 into main Aug 26, 2024
30 checks passed
@Cristhianzl Cristhianzl deleted the cz/timeoutHandle branch August 26, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants