Architect Flow - Data Action

Something’s off with the data actions in Architect.

We’ve got a flow that’s calling a custom data action - just a simple POST to /api/v2/integrations/actions/{actionId}/execute. It worked fine last week. Now it’s failing with a 400.

The payload the SDK is sending looks correct. It’s matching the schema. But the error says it’s missing a discriminator. At my last shop, we saw this when the generator wasn’t including the type field.

Here’s the error.

{
 "message": "Invalid request body. Missing discriminator field.",
 "code": "INVALID_REQUEST_BODY",
 "details": [
 {
 "field": "$.payload",
 "message": "Must have a discriminator field."
 }
 ]
}

Using @genesyscloud/platform-client-sdk v9.1.0.

Is anyone else seeing this? Feels like something’s changed on the platform side. Or maybe the schema definition’s wrong.
hope this helps someone

Fun one today. Is anyone else running into these discriminator headaches? We hit something similar last month - totally baffling at first. Turns out the generated schema from the Architect UI doesn’t always include the discriminator field, even when it should.

What we ended up doing was just hardcoding it into the payload builder in our Spring Boot service. It’s a bit of a hack, sure, but it fixes the 400. The discriminator should be set to dataActionRequest.

Here’s a snippet:

DataActionRequest request = DataActionRequest.builder()
 .discriminator("dataActionRequest") // Add this line
 .payload(yourPayload)
 .build();

platformClient.getDataintegrationsActionsApi()
 .executeDataAction(actionId, request);

It feels…wrong, I know, but it’s faster than digging through the UI and re-generating the schema a dozen times. Plus, we’ve got a ton of these data actions and it’s a quick win.

2 Likes