Handle missing file history when listing virology results to import - #1008
Merged
labkey-martyp merged 1 commit intoAug 14, 2026
Merged
Conversation
The failure callback in getFileHistory called reject, which was never destructured from the promise executor, so a failed history lookup threw a ReferenceError instead of rejecting. It now logs and resolves so one unreadable file no longer drops the entire import list. A file placed on the server outside of an upload has no file system audit record, so history[0].data.date threw. Those rows now report their upload date as Unknown rather than substituting an unrelated timestamp. Promise.all had no rejection handler, so any failure left the Loading mask up with no feedback. It now hides the mask and alerts.
guyinco6nito
approved these changes
Aug 13, 2026
guyinco6nito
left a comment
Collaborator
There was a problem hiding this comment.
Looks great to me, I see no benefit to having this crash when the history is blank. Approved! -Dan Metzger
labkey-bpatel
approved these changes
Aug 14, 2026
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.
Rationale
The "Import Results from File" list in the virology results grid could fail to render. Each candidate file's upload date comes from a webdav file-history lookup, and two paths through that lookup were broken: a file with no file system audit record threw on
history[0].data.date, and the lookup's own failure callback called an undefinedreject, throwing a ReferenceError instead of rejecting. Either one rejected the enclosingPromise.all, which had no rejection handler, so the window stayed behind a "Loading..." mask with no error shown.Related Pull Requests
None.
Changes
getFileHistoryresolves instead of rejecting on a failed lookup, so one unreadable file no longer drops the whole import list.Unknownrather than a substituted timestamp.Promise.allso failures hide the loading mask and surface an alert.getFileHistoryresolves{name, uploaded}rather than a positional[filename, history]pair.