Exception when trying to get a call conversation

Hello API team,

I'm getting an exception when trying to retrieve a call via API.

CreateCallResponse result = apiInstance.postCalls(callRequest); callId = result.getId(); CallConversation result = apiInstance.getCallsCallId(callId);

Results in:

com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of com.mypurecloud.sdk.model.CallMediaParticipant$StateEnum from String value 'connected': value not one of declared Enum instance names: [UPLOADING, CONTACTING, TERMINATED, OFFERING, NONE, CONNECTED, DISCONNECTED, TRANSMITTING, CONVERTING, DIALING, ALERTING]

Am I doing something wrong?

Sean

No. The API is documented as expecting CONNECTED, so that's what the SDK expects, but is actually sending connected so it fails to parse the enum. I'm working on a project to remove enums from all of the SDKs and replace with string values. Unfortunately, this will be broken until that effort is complete; it's one of my top priorities, but is quite a bit of work. For now, you'll have to work around it by making that request manually (with RestSharp) or modifying the enum values in the SDK's source code and building it yourself.

OK, no problem. I'll find a way to work around.

@tim.smith Do you have an ETA for when this will be fixed? Looks like it's affecting a number of conversation API endpoints.

I don't have an ETA, but the .NET and Java SDKs are at the top of my list for this fix. As long as nothing else with higher priority comes up, I hope to have them released this week.

The fix for this will be available as soon as this version syncs to maven central.

1 Like