Skip to content

Commit cb01644

Browse files
committed
fix: Ignore null values from Toolbox core to fix server error of type validation
1 parent fef8b40 commit cb01644

File tree

1 file changed

+5
-0
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+5
-0
lines changed

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ async def __call__(self, *args: Any, **kwargs: Any) -> str:
287287
for param, value in self.__bound_parameters.items():
288288
payload[param] = await resolve_value(value)
289289

290+
# Remove None values to prevent server-side type errors. The Toolbox
291+
# server requires specific types for each parameter and will raise an
292+
# error if it receives a None value, which it cannot convert.
293+
payload = {k: v for k, v in payload.items() if v is not None}
294+
290295
# create headers for auth services
291296
headers = {}
292297
for client_header_name, client_header_val in self.__client_headers.items():

0 commit comments

Comments
 (0)