Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/syft/src/syft/service/code/user_code_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,9 @@ def is_execution_allowed(
return IsExecutionAllowedEnum.OUTPUT_POLICY_NONE

try:
output_policy.is_valid(context)
is_valid = output_policy.is_valid(context)
if not is_valid:
return IsExecutionAllowedEnum.INVALID_OUTPUT_POLICY
except Exception:
return IsExecutionAllowedEnum.INVALID_OUTPUT_POLICY

Expand Down