-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
When Vonage returns a 204 response a JSONDecodeError exception is raised.
Expected Behavior
On an 204 response without a body HttpClient's _parse_response should return None.
Current Behavior
_parse_response raises JSONDecodeError
Possible Solution
_parse_response catches json.JSONDecodeError instead of requests.JSONDecodeError missing the fallback logic that returns None
Steps to Reproduce (for bugs)
Call _parse_response over a Response 204 object without body.
Context
Sometimes Vonage calls crash because the response is not parsed correctly to we have to add extra exception handling to the logic.
Your Environment
- vonage version: 4.4.3
- vonage-http-client version: 1.5.1
Metadata
Metadata
Assignees
Labels
No labels