[26.0] Fix infinite request loop on dataset preview fetch failure#21881
Merged
mvdbeek merged 3 commits intogalaxyproject:release_26.0from Feb 20, 2026
Merged
Conversation
When navigating to a dataset preview for a dataset you don't have access to (or with an invalid ID), the useKeyedCache composable would retry the failed fetch indefinitely. On error, nothing was written to storedItems, so the next reactive evaluation of getItemById would see undefined and trigger another fetch. Now getItemById skips re-fetching when a loadError is already recorded for that ID. Also updated DatasetView to show an error message instead of spinning forever. Fixes galaxyproject#21863
mvdbeek
reviewed
Feb 18, 2026
| return (id: string) => { | ||
| const item = storedItems.value[id]; | ||
| if (shouldFetch(item)) { | ||
| // TODO: consider allowing retries for transient errors (e.g. 5xx, network) |
Member
There was a problem hiding this comment.
Should probably also keep going on 429 ... could you give that a shot ? We do have rate limiting on on usegalaxy.org
mvdbeek
approved these changes
Feb 18, 2026
Adds an ApiError class that preserves HTTP status codes from API responses. The keyedCache now distinguishes transient errors (429, 5xx) from permanent ones (403, 404) -- transient errors get up to 3 retry attempts while permanent errors stop immediately. Updated fetchDatasetDetails to use rethrowSimpleWithStatus so the status code propagates through to the cache layer.
Member
Author
|
One note, there are a bunch of other stores also using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When navigating to a dataset preview for a dataset you can't access (or with a bad ID), the
useKeyedCachecomposable would retry the failed fetch indefinitely. On error, nothing was written tostoredItems, so the next reactive evaluation ofgetItemByIdwould seeundefinedand fire off another request. This adds a check againstloadingErrorsto stop that loop, and updatesDatasetViewto show an error message instead of spinning forever.Fixes #21863