Error1 reports
Fix JSONDecodeError
in Vonage SDK
✅ Solution
JSONDecodeError often occurs when the `json.loads` function receives an empty string or a string that isn't valid JSON, commonly from HTTP 204 responses. To fix this, check if the response content is empty before attempting to decode it as JSON; if empty, return an appropriate default value like `None` or an empty dictionary instead of calling `response.json()`. This prevents the error when no JSON content is actually present in the response.
Related Issues
Real GitHub issues where developers encountered this error:
Timeline
First reported:Sep 1, 2025
Last reported:Sep 1, 2025