Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix: correct label formatting and empty path handling in transform warnings

Ratnaditya-Jab460f250cbb
diff --git a/ts/packages/core/src/utils/transform.ts b/ts/packages/core/src/utils/transform.ts
index 60a78ebb4..02c7915ff 100644
--- a/ts/packages/core/src/utils/transform.ts
+++ b/ts/packages/core/src/utils/transform.ts
@@ -26,9 +26,9 @@ export function transform<RawInput>(raw: RawInput) {
const result = schema.safeParse(transformed);
if (!result.success) {
- const label = options?.label ? ` ${options.label}` : '';
+ const label = options?.label ? ` for ${options.label}` : '';
const issues = result.error.issues
- .map(issue => ` - ${issue.path.join('.')}: ${issue.message}`)
+ .map(issue => ` - ${issue.path.join('.') || 'parameter'}: ${issue.message}`)
.join('\n');
logger.warn(`Transform validation failed${label}:\n${issues}`);
return transformed;