Studio Handover to Cognigy failing with 500 after OTel context injection

We’re seeing consistent 500 errors when trying to hand over a session from a CXone Studio script to our NICE Cognigy Voicebot. The goal is to pass the OpenTelemetry trace context along with the conversation payload so we can correlate the bot interaction with the upstream Data Action calls.

The Studio script uses a GetRESTProxy snippet to call the Cognigy API. I’ve verified the endpoint and auth token are correct by calling it directly from Postman. It works fine there. In Studio, the request fails immediately.

Here’s the snippet:

{
 "name": "HandoverToCognigy",
 "type": "GetRESTProxy",
 "properties": {
 "url": "https://api.cognigy.ai/v1/dialogs",
 "method": "POST",
 "headers": {
 "Authorization": "Bearer ${oauthToken}",
 "Content-Type": "application/json",
 "X-Trace-Id": "${otelTraceId}"
 },
 "body": {
 "conversationId": "${conversationId}",
 "userId": "${userId}",
 "context": {
 "traceParent": "${traceParent}"
 }
 }
 }
}

The error response in the Studio log is generic:

HTTP 500 Internal Server Error
Payload: {"error": "Failed to process handover"}

I suspect the issue might be related to how the traceParent string is being serialized or if there’s a character encoding issue when passing it through the Studio variable system. The otelTraceId is a hex string, but traceParent includes hyphens and version info. Could the REST proxy be choking on the special characters in the header value?

Also, is there a size limit on the header values for the Studio REST proxy that I’m hitting? The traceParent string is about 55 characters. Seems small, but you never know.

We’re running this in the Asia/Manila region. Any ideas on how to debug the actual request payload being sent from Studio?