Skip to content

Commit 89689b2

Browse files
authored
handle-blank-response-202 (#949)
1 parent 3b82ae1 commit 89689b2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

twilio/base/version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,9 @@ def _parse_create(self, method: str, uri: str, response: Response) -> Any:
777777
if response.status_code < 200 or response.status_code >= 300:
778778
raise self.exception(method, uri, response, "Unable to create record")
779779

780+
if not response.text:
781+
return {}
782+
780783
return json.loads(response.text)
781784

782785
def create(

0 commit comments

Comments
 (0)