fix: sanitize unexpected confirmed Tool resolution errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Charles YaoandClaude Opus 5.5 committed 2026-10-11 16:47:54 -07:00
1 parent a7a0c5743b
commit 39da07d63a
2 files changed
+77 -2

No files matched your search

+10 -2
View File
@@ -604,9 +604,17 @@ class DifyToolNodeRuntime(ToolNodeRuntimeProtocol):
variable_pool,
confirmed_guard=guard,
)
except ToolNodeError:
raise
except BuilderExecutionPolicyError as exc:
# Declared refusals carry only their fixed reason code.
raise ToolRuntimeResolutionError(str(exc)) from exc
except Exception as exc:
if self._confirmed:
# Provider, cache or credential text must not leave the confirmed boundary.
raise ToolRuntimeResolutionError(
str(BuilderExecutionPolicyError("confirmed_tool_resolution_failed"))
) from None
if isinstance(exc, ToolNodeError):
raise
raise ToolRuntimeResolutionError(str(exc)) from exc
conversation_id = (