Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a standardized fetch timeout mechanism across multiple API calls to improve reliability and user experience when backend services are slow or unresponsive. The main change is the addition of a reusable
fetchWithTimeoututility, which is now used in several API helper functions to enforce a default timeout (typically 1 minute), with the option to override as needed.API Timeout Handling Improvements:
fetchWithTimeoutfunction inutils.tsthat wraps fetch requests with an abortable timeout, throwing a user-friendly error if the request takes too long.searchWithBackendinapi.tsto usefetchWithTimeoutwith a configurable timeout parameter (default 1 minute). [1] [2] [3]fetchFilesFromMetrix,submitMetadataToDispatcher, andcheckTaskStatusindispatcherApi.tsto usefetchWithTimeout, each now accepting an optionaltimeoutMsparameter and defaulting to 1 minute. [1] [2] [3] [4]These changes make the application's network requests more robust, preventing indefinite hangs and providing clearer error messages to users when backend services are slow or unavailable.