Hi
In some cases, running GetFlowLatestconfiguration with .net sdk results in the error,
"The reader's MaxDepth of 64 has been exceeded."
var test = gcArchApi.GetFlowLatestconfiguration(item.Id);
Stack trace
PureCloudPlatform.Client.V2.Client.ApiClient.Deserialize(RestResponse response, Type type)
PureCloudPlatform.Client.V2.Api.ArchitectApi.GetFlowLatestconfigurationWithHttpInfo(String flowId, Nullable1 deleted) PureCloudPlatform.Client.V2.Api.ArchitectApi.GetFlowLatestconfiguration(String flowId, Nullable
1 deleted)
The problem did not occur with the following combination of versions:
"Newtonsoft.Json" Version="12.0.1"
"PureCloudPlatform.Client.V2" Version="154.0.0"
"RestSharp" Version="106.3.1"
It appears that the cause of this issue is the change in default value to 64 in Newtonsoft version 13.0.1, as described in "Change - JsonReader and JsonSerializer MaxDepth defaults to 64".
https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1
It seems that the setting can be changed at
https://www.newtonsoft.com/json/help/html/MaxDepth.htm.
Is it possible to increase the upper limit of 64?
The error occurs in the Architect step when the following setting is applied to the Custom audio expression:
If(Flow.Ann2 == "" , ToAudioBlank(10) ,
Append(ToAudioBlank(100),
If(Flow.Ann2 == "test_002",ToAudio(Prompt.test_001),
If(Flow.Ann2 == "test_002",ToAudio(Prompt.test_002),
If(Flow.Ann2 == "test_003",ToAudio(Prompt.test_003),
If(Flow.Ann2 == "test_004",ToAudio(Prompt.test_004),
If(Flow.Ann2 == "test_005",ToAudio(Prompt.test_005),
If(Flow.Ann2 == "test_006",ToAudio(Prompt.test_006),
If(Flow.Ann2 == "test_007",ToAudio(Prompt.test_007),
If(Flow.Ann2 == "test_008",ToAudio(Prompt.test_008),
If(Flow.Ann2 == "test_009",ToAudio(Prompt.test_009),
If(Flow.Ann2 == "test_010",ToAudio(Prompt.test_010),
If(Flow.Ann2 == "test_011",ToAudio(Prompt.test_011),
If(Flow.Ann2 == "test_012",ToAudio(Prompt.test_012),
If(Flow.Ann2 == "test_013",ToAudio(Prompt.test_013),
If(Flow.Ann2 == "test_014",ToAudio(Prompt.test_014),
If(Flow.Ann2 == "test_015",ToAudio(Prompt.test_015),
If(Flow.Ann2 == "test_016",ToAudio(Prompt.test_016),
If(Flow.Ann2 == "test_017",ToAudio(Prompt.test_017),
If(Flow.Ann2 == "test_018",ToAudio(Prompt.test_018),
If(Flow.Ann2 == "test_019",ToAudio(Prompt.test_019),
If(Flow.Ann2 == "test_020",ToAudio(Prompt.test_020),
If(Flow.Ann2 == "test_021",ToAudio(Prompt.test_021),
If(Flow.Ann2 == "test_022",ToAudio(Prompt.test_022),
If(Flow.Ann2 == "test_023",ToAudio(Prompt.test_023),
If(Flow.Ann2 == "test_024",ToAudio(Prompt.test_024),
If(Flow.Ann2 == "test_025",ToAudio(Prompt.test_025),
If(Flow.Ann2 == "test_026",ToAudio(Prompt.test_026),
If(Flow.Ann2 == "test_027",ToAudio(Prompt.test_027),
If(Flow.Ann2 == "test_028",ToAudio(Prompt.test_028),
If(Flow.Ann2 == "test_029",ToAudio(Prompt.test_029),
If(Flow.Ann2 == "test_030",ToAudio(Prompt.test_030),
If(Flow.Ann2 == "test_031",ToAudio(Prompt.test_031),
If(Flow.Ann2 == "test_032",ToAudio(Prompt.test_032),
If(Flow.Ann2 == "test_033",ToAudio(Prompt.test_033),
If(Flow.Ann2 == "test_034",ToAudio(Prompt.test_034),
If(Flow.Ann2 == "test_035",ToAudio(Prompt.test_035),
If(Flow.Ann2 == "test_036",ToAudio(Prompt.test_036),
If(Flow.Ann2 == "test_037",ToAudio(Prompt.test_037),
If(Flow.Ann2 == "test_038",ToAudio(Prompt.test_038),
If(Flow.Ann2 == "test_039",ToAudio(Prompt.test_039),
If(Flow.Ann2 == "test_040",ToAudio(Prompt.test_040),
If(Flow.Ann2 == "test_041",ToAudio(Prompt.test_041),
If(Flow.Ann2 == "test_042",ToAudio(Prompt.test_042),
If(Flow.Ann2 == "test_043",ToAudio(Prompt.test_043),
If(Flow.Ann2 == "test_044",ToAudio(Prompt.test_044),
If(Flow.Ann2 == "test_045",ToAudio(Prompt.test_045),
If(Flow.Ann2 == "test_046",ToAudio(Prompt.test_046),
If(Flow.Ann2 == "test_047",ToAudio(Prompt.test_047),
If(Flow.Ann2 == "test_048",ToAudio(Prompt.test_048),
If(Flow.Ann2 == "test_049",ToAudio(Prompt.test_049),
If(Flow.Ann2 == "test_050",ToAudio(Prompt.test_050),
ToAudioBlank(10))
)))))))))))))))))))))))))))))))))))))))))))))))))))
Thanks
Ishi