Unknown JSON item type: String

Status
Not open for further replies.

drenda

Forum User
Joined
May 3, 2020
Messages
30
Reaction score
10
Hi,
I created my template for integration with a custom CRM. Everything seems to work fine, both call lookup and journaling calls.

However, when i test the configuration file in the 3CX template generator, I've and exception in the first tab:

Code:
System.Exception: Unknown JSON item type: String
   in CrmIntegration.JsonResponseParser.ParseInternal(Object json)
   in CrmIntegration.ScenarioProcessorBase.<ProcessRequest>d__17.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   in CrmIntegration.ScenarioProcessorBase.<ProcessScenario>d__8.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   in CrmIntegration.ScenarioProcessorBase.<Execute>d__7.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   in CrmIntegration.CrmProcessor.<ExecuteScenarioByName>d__15.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   in CrmIntegration.CrmProcessor.<ReportCall>d__16.MoveNext()

I've this exception both in matching scenario and ReportCall scenario. I don't think it depends on the response of the CRM because in matching scenario it returns a JSON value and still I've the exception.

Do you have any hint about it? Could be a problem in the template generator app?

Thanks
 

Attachments

  • 1.png
    1.png
    52.8 KB · Views: 11
  • 2.png
    2.png
    30.5 KB · Views: 11
This is because the response is just the text "OK" as you can see in the second screenshot. The server response should be JSON or XML.
 
I guessed that but it's not clear because I see the same exception even for the Matching scenario when the CRM return a JSON.

Anyway, I can do a test. What the CRM is supposed to return for the POST request? Is an empty content ok?

Thanks
 
I guessed that but it's not clear because I see the same exception even for the Matching scenario when the CRM return a JSON.
I would like to see the logs to confirm this...

Anyway, I can do a test. What the CRM is supposed to return for the POST request? Is an empty content ok?
For Call Journaling or Contact Creation you might not return any data, if you don't want to analyze any response. Usually a REST API returns JSON or XML with a successful status code, but this is not mandatory.
 
Ok thanks. I tried returning No content and I've no more exceptions. Thanks!
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Forum statistics

Threads
112,326
Messages
591,900
Members
165,479
Latest member
Senergia