Skip to content

Commit 5ec445f

Browse files
authored
feat(isolate): return SerializationError instead of aborting (#170)
1 parent c5d8ed2 commit 5ec445f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/isolate/connections/grpc/agent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def execute_function(
126126
# TODO: technically any sort of exception could be raised here, since
127127
# depickling is basically involves code execution from the *user*.
128128
function = from_grpc(function)
129-
except SerializationError:
130-
traceback.print_exc()
131-
raise AbortException(
132-
f"The {function_kind} function could not be deserialized."
133-
)
129+
except SerializationError as exc:
130+
str_tb = traceback.format_exc()
131+
self.log(str_tb)
132+
self.log(f"The {function_kind} function could not be deserialized.")
133+
return exc, True, str_tb
134134

135135
if not callable(function):
136136
raise AbortException(

0 commit comments

Comments
 (0)