successEvaluation is returning incomplete json obj...
# support
c
Hi, I'm seeing that some of the evaluations returned from vapi are incomplete json objects that often end mid-sentence. As a result the json object is not valid. I'm seeing this a bunch of times today Is there a max char limit that vapi can return in the successEvaluation response? Based on my testing there seems to be a limit around ~8,500 chars. btw, my successEvaluationPlan.timeoutSeconds is set to the max value (60) Example callIds: - c5c59b48-d77b-4a11-a919-0caa69553a52 - 85613935-ce25-46c0-9e4a-910a60073df4 - 49ffa6b3-e0c7-49fb-9dc0-49d4cdc862d5 - 3ef41ec0-0d68-48a9-b4f8-bf88d62e59fa - eccc95dc-2eb1-4685-b11f-753f7d323a1b - d74a1c5a-d90a-41fa-86a0-37a75472d7c0 - 40e21104-7d79-4954-ba74-aabac81e03d9 - 9899afc4-a7ac-4ca4-8d84-dbf506982c3c - 614bea3a-fe01-4f76-8e21-ea31415bd0fa - cc1b4f2c-a619-4fff-888e-e5db8654f6ea Happy to share more info if needed. I'd appreciate some help investigating why this happens for these calls. Thanks!
v
Based on the information I found, the most likely cause of incomplete JSON objects in successEvaluation is JSON formatting issues. Line breaks or incorrect escaping in your response can lead to malformed JSON. Try ensuring your result is returned as a single paragraph without line breaks:
Copy code
javascript
// Instead of this (problematic)
const result = JSON.stringify({
  data: "multi-line content"
}, null, 2);

// Do this (better)
const result = JSON.stringify({data: "content"});
Tool calls expect string results without line breaks, as malformed JSON with breaks can cause parsing issues. Sources: - [Discord discussion about JSON formatting issues](https://discord.com/channels/1211482211119796234/1334658296291921920) - [Discord discussion about tool call responses](https://discord.com/channels/1211482211119796234/1342176467714572400)
Based on the information I found, the most likely cause of incomplete JSON objects in successEvaluation is JSON formatting issues. Line breaks or incorrect escaping in your response can lead to malformed JSON. Try ensuring your result is returned as a single paragraph without line breaks:
Copy code
javascript
// Instead of this (problematic)
const result = JSON.stringify({
  data: "multi-line content"
}, null, 2);

// Do this (better)
const result = JSON.stringify({data: "content"});
Tool calls expect string results without line breaks, as malformed JSON with breaks can cause parsing issues. Sources: - [Discord discussion about JSON formatting issues](https://discord.com/channels/1211482211119796234/1334658296291921920) - [Discord discussion about tool call responses](https://discord.com/channels/1211482211119796234/1342176467714572400)
s
Thank you for sharing all the call ids. We will investigate this issue and get back to you