Skip to content

Commit

Permalink
feat(agent): return SerializationError instead of aborting (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Apr 26, 2024
1 parent 3b13546 commit 042c78f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/isolate/connections/grpc/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ def execute_function(
# TODO: technically any sort of exception could be raised here, since
# depickling is basically involves code execution from the *user*.
function = from_grpc(function)
except SerializationError:
yield from self.log(traceback.format_exc(), level=LogLevel.ERROR)
raise AbortException(
f"The {function_kind} function could not be deserialized."
)
except SerializationError as exc:
return exc, True, traceback.format_exc()

if not callable(function):
raise AbortException(
Expand Down

0 comments on commit 042c78f

Please sign in to comment.