REST Proxy 502 when mapping nested array to Data Action in Studio

{"error": "Bad Gateway", "code": 502, "message": "Upstream service timeout or malformed JSON response"}

Studio is choking on the response mapping. The flow hits a REST Proxy action calling our internal inventory service, and the response comes back as a 200 OK with a payload containing a nested array of SKUs. The problem appears when trying to map response.body.items[*].skuId into the Data Action output variable. The Data Action just drops the transaction into the error path without throwing a specific validation error in the flow logs.

Checking the raw response in the debug view shows the JSON is perfectly valid. It’s not a schema mismatch. The REST Proxy action is configured with application/json for both request and response. Headers look clean. The debug view is doing jack all. Mic stays hot on the call bridge while this hangs.

Current environment is Studio version 24.3.0. The REST Proxy endpoint is POST /api/v1/inventory/check. The mapping expression used in the Data Action is {{restProxyResponse.body.items[*].skuId}}. This worked fine in the sandbox org last week. Production isn’t behaving differently. The upstream service logs show the request completing in 120ms, so latency isn’t the culprit here.

Wrapped the REST Proxy call in a SNIPPET action to handle retries, but the snippet itself exits cleanly. The error only surfaces when the Data Action tries to consume the snippet’s output. The snippet returns a JSON object with the items array intact. Passing that object directly to a Set Variable action works fine. The issue is isolated to the Data Action mapping engine. Here’s the snippet output structure:

{
 "success": true,
 "payload": {
 "items": [
 { "skuId": "12345", "qty": 10 },
 { "skuId": "67890", "qty": 5 }
 ]
 }
}

The Data Action expects {{snippetResponse.payload.items[*].skuId}}. This syntax worked in v23.12.0. Upgrading to 24.3.0 seems to have broken the wildcard expansion for arrays inside nested objects within SNIPPET outputs. The Studio console throws a generic 502 instead of a mapping error. It’s frustrating because the payload is valid JSON. The REST Proxy logs show the response body size is 4.2KB. Nothing huge. The mapping expression evaluator seems to be timing out or hitting a recursion limit. Tried flattening the array inside the SNIPPET using a loop, but that introduces latency issues. The flow execution trace stops right at the mapping step. There’s no stack trace provided by the console.