Skip to content

Commit

Permalink
Merge pull request #8767 from OpenMined/eelco/workerpool-error-handling
Browse files Browse the repository at this point in the history
add error handling for get workerpool
  • Loading branch information
eelcovdw committed Apr 30, 2024
2 parents a6ce0a7 + 97bd314 commit f060e77
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit f060e77

Please sign in to comment.