Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add error handling for get workerpool #8767

Merged
merged 7 commits into from
Apr 30, 2024
5 changes: 5 additions & 0 deletions packages/syft/src/syft/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,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,
Expand Down