Skip to content

Commit

Permalink
Clearer remote error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Aug 14, 2023
1 parent f7f1f33 commit 2170b02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pydatalab/pydatalab/remote_filesystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ def _call_remote_tree(
if stderr:
raise RuntimeError(f"Remote tree process {command!r} returned: {stderr!r}")

return json.loads(stdout)
try:
return json.loads(stdout)
except Exception:
raise RuntimeError(f"Remote tree process {command!r} returned: {stdout!r}")

if hostname:
LOGGER.debug(f"Calling remote {tree_command} on {directory_path}")
Expand Down

0 comments on commit 2170b02

Please sign in to comment.