Skip to content

Handle network errors during load container operation #24536

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bhavin121
Copy link

@bhavin121 bhavin121 commented May 7, 2025

Description

This pull request addresses the issue of unhandled generic network errors during the document loading phase in the Fluid client.

Issue

When a genericNetworkError occurs during the attach phase while creating a new document, it is retried based on the canRetry flag. However, if the same genericNetworkError occurs while loading an existing document, no retry is attempted, and the user receives the exception.

  • The attach method in container.ts wraps the call to serviceFactory.createContainer in runWithRetry, which handles retries in case of an exception.
  • The load method in container.ts directly calls serviceFactory.createDocumentService without wrapping it in runWithRetry, leading to unhandled exceptions.

Changes Made

  • Wrapped the call to serviceProvider() in runWithRetry within the createDocumentService method in container.ts.
  • Ensured that the retry logic mirrors the strategy employed during the attach phase (As we are using the same runWithRetry method that is used in the attach function).

Impact

Implementing a retry mechanism during the document loading phase will significantly enhance the Fluid client’s resilience to network errors, providing a smoother and more reliable user experience.

This PR addresses #24114

@github-actions github-actions bot added area: loader Loader related issues base: main PRs targeted against main branch labels May 7, 2025
@bhavin121 bhavin121 changed the title Handle network errors during getContainer operation Handle network errors during load container operation May 7, 2025
@tylerbutler tylerbutler requested a review from vladsud May 21, 2025 16:20
@tylerbutler
Copy link
Member

@vladsud Could you take a look at this or recommend someone to? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: loader Loader related issues base: main PRs targeted against main branch community-contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants