Skip to content

Commit 9de02db

Browse files
committed
propagte error
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent f5594c4 commit 9de02db

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/pynumaflow/pynumaflow/shared

packages/pynumaflow/pynumaflow/shared/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,14 @@ def check_instance(instance, callable_type) -> bool:
263263
return False
264264

265265

266-
def get_grpc_status(err: str):
266+
def get_grpc_status(err: str, detail: str | None = None):
267267
"""
268268
Create a grpc status object with the error details.
269269
"""
270270
details = any_pb2.Any()
271271
details.Pack(
272272
error_details_pb2.DebugInfo(
273-
detail="\n".join(traceback.format_stack()),
273+
detail=detail if detail is not None else "\n".join(traceback.format_stack()),
274274
)
275275
)
276276

@@ -317,7 +317,7 @@ def update_context_err(context: NumaflowServicerContext, e: BaseException, err_m
317317
_LOGGER.critical(trace)
318318
_LOGGER.critical(err_msg)
319319

320-
grpc_status = get_grpc_status(err_msg)
320+
grpc_status = get_grpc_status(err_msg, detail=trace)
321321

322322
context.set_code(grpc.StatusCode.INTERNAL)
323323
context.set_details(err_msg)

0 commit comments

Comments
 (0)