mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 06:41:07 +08:00
fix: sanitize unexpected confirmed Tool resolution errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a7a0c5743b
commit
39da07d63a
2 files changed
+77
-2
No files matched your search
@@ -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 = (
|
||||
|
||||
Reference in new issue
Block a user