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

PUBLIC-1009 add better error handling when a staging area directory... #1604

Merged
merged 5 commits into from
Mar 31, 2020

Conversation

briehl
Copy link
Member

@briehl briehl commented Mar 24, 2020

...doesn't exist.
Previously, it was a big red box that was only removable by refreshing the page.

Now, it should look something like this:
Screen Shot 2020-03-23 at 4 52 41 PM

@briehl
Copy link
Member Author

briehl commented Mar 24, 2020

This means a user can now navigate back to a directory that does exist.

@coveralls
Copy link

coveralls commented Mar 24, 2020

Coverage Status

Coverage increased (+0.06%) to 17.354% when pulling 7bd42f9 on briehl:PUBLIC-1009-staging-subdir into b6f1cdf on kbase:develop.

@briehl
Copy link
Member Author

briehl commented Mar 25, 2020

Detailed notes on changes.

  • Previously, when an error occurred during lookup, the whole table and control area was replaced with a big red error. Now it renders the controls, and shows a table with either a more sensible "no data" message, or the error message.
  • Wrapped the call in a Bluebird promise, since that's used everywhere else, and it was affecting testing (by making it impossible).

@briehl briehl requested a review from eapearson March 25, 2020 20:50
@eapearson
Copy link
Contributor

eapearson commented Mar 26, 2020

Code changes look great.
I've set this up locally and replicated the issue. I can see the fix in effect.
For the issue specifically raised in PUBLIC-1009, I can see the change from an error message which replaces the content below the drag-and-drop upload area to retaining the file list table and controls with a message like "path eapearson/test3 does not exist".
This is perhaps too subtle?
The message could be a red error message to get the user's attention, and to signify that it is indeed an error. I didn't see the error message initially.
Also, since there are indeed no files to show, I think it would actually be appropriate to replace the table view with an error message (but retaining the controls above it), and either show controls or do something to help the user out of the situation. E.g. navigate to the next existing parent directory.
Also the error message could be more useful. E.g. instead of "path eapearson/test3 does not exist", perhaps "directory 'test3' cannot be displayed because it has been deleted", since we know it did exist earlier and must have been deleted.

@eapearson
Copy link
Contributor

Another issue was raised when uncovering a (current, in CI) bug listing any newly-added files. Easy to replicate, just upload a file, the import table will immediately show an error message. Since the error goes away if the file is removed (e.g. via globus), it is reasonable to assume it is in the server code which processes the file listing.

The Narrative issue is that it shows an error message when the error is first triggered which is not displayed after the narrative is reloaded and the import tab revisited.

I noticed, too, that the "500 Internal Server Error" error message displayed is not styled with red error colors (background or lettering).

Also, if there is an error fetching the entries for a directory, it is debatable that the table, or at least the table paraphernalia ("Showing ...", previous/next buttons, search) controls should be displayed since they imply that there is something to be displayed or searched over, when in the case of a directory listing throwing an error, there is nothing to be done there (and if it is at the top level directory, nothing the user can do at all!)

Screen Shot 2020-03-26 at 1 55 15 PM

Screen Shot 2020-03-26 at 1 54 48 PM

@briehl
Copy link
Member Author

briehl commented Mar 26, 2020

The message could be a red error message to get the user's attention, and to signify that it is indeed an error. I didn't see the error message initially.

Yup, agreed.

Also, since there are indeed no files to show, I think it would actually be appropriate to replace the table view with an error message (but retaining the controls above it), and either show controls or do something to help the user out of the situation. E.g. navigate to the next existing parent directory.

Also agreed. That control is actually rendered by embedding it in the datatables call. I was avoiding removing that and fighting against the datatables rendering pipeline. But we can probably just fork how that render logic gets run. I was just trying to avoid the extra refactor. :)

But you're right. It's worth the effort.

Also the error message could be more useful. E.g. instead of "path eapearson/test3 does not exist", perhaps "directory 'test3' cannot be displayed because it has been deleted", since we know it did exist earlier and must have been deleted.

Good idea. It should be possible to parse the errors into something better than just a giant 500 Internal Server Error, which is just big and imposing.

@briehl
Copy link
Member Author

briehl commented Mar 30, 2020

Should be some better error messaging here now, in line with our conversation.

@briehl briehl merged commit 1e81788 into kbase:develop Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants