From 6a8725a641e75bc7b2d826e42b298feb5cd5ddf2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 9 Mar 2021 11:21:03 -0500 Subject: [PATCH] Bug fix - poor feedback for remote file listing exceptions. --- lib/galaxy/webapps/galaxy/api/remote_files.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/remote_files.py b/lib/galaxy/webapps/galaxy/api/remote_files.py index cd08d871f39b..053cadef3c9b 100644 --- a/lib/galaxy/webapps/galaxy/api/remote_files.py +++ b/lib/galaxy/webapps/galaxy/api/remote_files.py @@ -68,7 +68,15 @@ def index(self, trans, **kwd): file_source_path = file_sources.get_file_source_path(uri) file_source = file_source_path.file_source - index = file_source.list(file_source_path.path, recursive=recursive, user_context=user_context) + try: + index = file_source.list(file_source_path.path, recursive=recursive, user_context=user_context) + except exceptions.MessageException: + log.warning(f"Problem listing file source path {file_source_path}", exc_info=True) + raise + except Exception: + message = f"Problem listing file source path {file_source_path}" + log.warning(message, exc_info=True) + raise exceptions.InternalServerError(message) if format == "flat": # rip out directories, ensure sorted by path index = [i for i in index if i["class"] == "File"]