Skip to content

Commit

Permalink
Catch all non-deserializable exceptions client-side (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongreenberg committed Apr 15, 2024
1 parent 8a726aa commit 02715f9
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions runhouse/servers/http/http_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,13 @@ def handle_response(
fn_exception = deserialize_data(
response_data["data"]["error"], response_data["serialization"]
)
except RuntimeError as e:
if "RuntimeError: Failed to unpickle" in str(e):
logger.error(
f"{system_color}{err_str}: Failed to unpickle exception. Please check the logs for more "
f"information.{reset_color}"
)
logger.error(
f"{system_color}Traceback: {fn_traceback}{reset_color}"
)
raise e
except Exception as e:
logger.error(
f"{system_color}{err_str}: Failed to unpickle exception. Please check the logs for more "
f"information.{reset_color}"
)
logger.error(f"{system_color}Traceback: {fn_traceback}{reset_color}")
raise e
if not (
isinstance(fn_exception, StopIteration)
or isinstance(fn_exception, GeneratorExit)
Expand Down

0 comments on commit 02715f9

Please sign in to comment.