Skip to content

Commit

Permalink
Merge pull request #11581 from jmchilton/files_plugin_error
Browse files Browse the repository at this point in the history
[21.01] Improve feedback for remote file listing exceptions.
  • Loading branch information
mvdbeek authored Mar 10, 2021
2 parents 517e6f9 + 6a8725a commit 90e4f0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/galaxy/webapps/galaxy/api/remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 90e4f0c

Please sign in to comment.