From 9a9507e1ef94a0c52b0919518ba762494f380e73 Mon Sep 17 00:00:00 2001 From: support-symplenormics <125123411+Support-Symplenormics@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:18:44 +0200 Subject: [PATCH] Update __init__.py Fixed the keyError: error error --- clickatell/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clickatell/__init__.py b/clickatell/__init__.py index 3edf733..0c184eb 100755 --- a/clickatell/__init__.py +++ b/clickatell/__init__.py @@ -42,7 +42,7 @@ def parseResponse(self, response): """ response['body'] = json.loads(response['body']) response['messages'] = response['body']['messages'] - response['error'] = response['body']['error'] + response['error'] = response['messages']['error'] del response['body'] return response @@ -75,4 +75,4 @@ def sendMessage(self, to, message, extra={}): :return dict :raises NotImplementedError """ - raise NotImplementedError() \ No newline at end of file + raise NotImplementedError()