@devries-cameron20 / composio-1 / commits / 851633d3b
Fork 0

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: log transform validation failures as warnings with field details (#2791)

Fixes #2716 The transform utility in ts/packages/core/src/utils/transform.ts was calling logger.error() with the raw ZodError object when schema validation failed. This made validation failures hard to debug because the error was logged as a serialized object blob with no context about which transform or which fields failed. Changes: - Replace logger.error(result.error) with logger.warn() that formats a human-readable message listing each failing field path and its validation message - Remove the unused ValidationError import and the stale commented-out throw block - Add test coverage for the transform utility (6 tests covering success, failure, labels, nested schemas) This is a non-breaking change. The transform still returns the untransformed data on validation failure (same behavior as before), but now the warning output actually tells you what went wrong and where. For example instead of a raw ZodError dump, you get: Transform validation failed for ConnectedAccount: - user.email: Invalid email The warn level was chosen over error because the current contract is soft-fail (return untransformed data). error level implies something is broken, warn level correctly signals "this data didn't validate but we're proceeding."

Alberto Schiabel committed Mar 18, 2026 at 22:17 UTC 851633d3bdd2e8991baa99f03072cb89760658b6

No changes.