The problem is that the Deno Deploy response likely lacks the application/json Content-Type header, causing the Genesys Cloud platform to discard the body.
This looks like a valid point regarding the Content-Type header. In my SLA monitoring integrations, I also ensure the response includes Cache-Control: no-cache to prevent Genesys Cloud from serving stale data. Verify your Deno handler explicitly sets both headers before returning the JSON payload.
This is caused by strict MIME type validation in the Genesys Cloud data action engine. The platform does not just look for JSON content; it expects the response headers to be explicit. If the Content-Type is missing or malformed, the parser silently returns an empty object {}. This is frustrating because the documentation implies a simple GET request, but the implementation is rigid.
Error: Data Action returned empty payload. Response body ignored due to missing or invalid Content-Type header.
I just fixed this exact issue in my SvelteKit proxy for status polling. The Deno Deploy endpoint must explicitly set the header. Here is the corrected handler logic:
Define the headers object explicitly.
Return the JSON with those headers.
Verify the response in Postman includes Content-Type: application/json.
If you are still getting {}, check the Network tab in your browser dev tools when testing the endpoint directly. Ensure the status code is strictly 200. A 204 No Content or 301 Redirect will also cause the action to fail silently. The Genesys Cloud Architect is not forgiving of HTTP edge cases. Fix the header, and the payload should populate immediately.