fix(rubrik): drop tool_call repr from normalize error to avoid leaking args

The TypeError raised in _normalize_tool_calls is caught by apply_guardrail's
broad except, which logs the message plus exc_info. Including repr(tc) in
the message could expose function arguments (potentially sensitive user
data) in the proxy log stream. Type name alone is enough for debugging.
This commit is contained in:
mateo-berri 2026-05-21 00:53:44 +00:00
parent 9309ebdd35
commit f3740e2f1b
No known key found for this signature in database

View file

@ -261,7 +261,7 @@ class RubrikLogger(CustomGuardrail, CustomBatchLogger):
)
else:
raise TypeError(
f"Cannot normalize tool_call of type {type(tc).__name__}: {tc!r}"
f"Cannot normalize tool_call of type {type(tc).__name__}"
)
return result