Architect.flowdata.action.completed dropping result object on data action 400 errors

TypeError: Cannot read properties of undefined (reading ‘records’)

Problem

GC sits at 2025-01.102.0. Express middleware catches architect.flowdata.action.completed events when the flow hits the Salesforce update data action. Payload structure looks fine for standard CRM writes, but the result object vanishes completely if the data action throws a validation error upstream. Console is empty on the Architect side, just shows a red X on the step. Queue’s doing jack all while the flow engine retries silently.

Middleware expects error details inside event.data.result. Array comes back flat with just the actionId and timestamp. Flow execution halts, yet the webhook doesn’t provide enough context to retry the HTTP call. It’s impossible to map the field mismatches without the raw response.

{
 "type": "architect.flowdata.action.completed",
 "data": {
 "actionId": "a1b2c3d4-5678-90ab-cdef-123456789012",
 "name": "Update_Contact_Salesforce",
 "result": null,
 "timestamp": "2025-01-15T14:32:10.000Z"
 }
}

JWT validation passes on the middleware side. Signature checks out. Lambda handler downstream is timing out because retry logic depends on result.errors. Data action config points to a valid endpoint, verified in Postman. GC logs show Data action execution failed but the webhook payload strips the HTTP response body entirely.

Express route handler logs the incoming body:

app.post('/gc/webhook', (req, res) => {
 const body = req.body;
 if (body.type === 'architect.flowdata.action.completed') {
 console.log('Result object:', body.data.result);
 // Result is null here. No error array.
 }
 res.status(200).send('OK');
});

Architect version is locked to the latest patch. Flow is set to continue on error, but the webhook event fires before the flow engine captures the exception details. Data action framework swallows the response when status hits 400. Need the actual JSON error body from Salesforce to map field mismatches back to the custom object.

Logs show the data action returned a 400, but the webhook payload structure remains identical to a successful execution. Result just sits as null. Error mapping breaks without the Salesforce message. No trace of the validation errors in the event data.