Handle Errors Without Leaking Information
Errors from your connector reach Flow Builder users and downstream consumers. Sanitize error output so it doesn’t expose implementation details or raw upstream responses.
The connector framework can return the upstream API’s raw error body to Flow Builder. The body can contain stack traces, internal hostnames, and account IDs. The same path can become a data-smuggling channel: a crafted upstream error body passes through to Flow variables, where downstream consumers can capture it.
Do: Return a generic error message and a correlation ID for log lookup.
Don’t: Pass response.error.value.body or response.error.value.body.^raw to the error output.
Vulnerable
Secure
Apply the principle: return only a generic message and a correlation ID for log lookup.
DataWeave’s default error messages expose internal type names, field names, and stack details. Users see these details when a connector operation fails in Flow.
Do: Return a stable, generic error code or message.
Don’t: Pass result.error or coercion errors directly into the response.
Vulnerable
Secure