From ed8586cbba932e4c94f529570d9bedc0b53bf27d Mon Sep 17 00:00:00 2001 From: eelcovdw Date: Fri, 26 Apr 2024 12:30:39 +0200 Subject: [PATCH] add error handling --- packages/syft/src/syft/node/node.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/syft/src/syft/node/node.py b/packages/syft/src/syft/node/node.py index 52069076164..d6196f5253c 100644 --- a/packages/syft/src/syft/node/node.py +++ b/packages/syft/src/syft/node/node.py @@ -1233,6 +1233,11 @@ def add_api_endpoint_execution_to_queue( else: worker_pool = self.get_worker_pool_by_name(worker_pool) + if isinstance(worker_pool, SyftError): + return worker_pool + elif worker_pool is None: + return SyftError(message="Worker pool not found") + # Create a Worker pool reference object worker_pool_ref = LinkedObject.from_obj( worker_pool,