Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : 'AppwritePythonSDK/8.0.0 (${os.uname().sysname}; ${os.uname().version}; ${os.uname().machine})',
'user-agent' : 'AppwritePythonSDK/9.0.0 (${os.uname().sysname}; ${os.uname().version}; ${os.uname().machine})',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing bug we need to fix, this should be an f-string it's not interpolating this 😬

'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '8.0.0',
'x-sdk-version': '9.0.0',
'X-Appwrite-Response-Format' : '1.6.0',
}

Expand Down Expand Up @@ -131,9 +131,9 @@ def call(self, method, path='', headers=None, params=None, response_type='json')
if response != None:
content_type = response.headers['Content-Type']
if content_type.startswith('application/json'):
raise AppwriteException(response.json()['message'], response.status_code, response.json().get('type'), response.json())
raise AppwriteException(response.json()['message'], response.status_code, response.json().get('type'), response.text)
else:
raise AppwriteException(response.text, response.status_code)
raise AppwriteException(response.text, response.status_code, None, response.text)
else:
raise AppwriteException(e)

Expand Down
1 change: 1 addition & 0 deletions appwrite/enums/credit_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ class CreditCard(Enum):
VISA = "visa"
MIR = "mir"
MAESTRO = "maestro"
RUPAY = "rupay"
5 changes: 3 additions & 2 deletions appwrite/enums/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ class Name(Enum):
V1_AUDITS = "v1-audits"
V1_MAILS = "v1-mails"
V1_FUNCTIONS = "v1-functions"
V1_USAGE = "v1-usage"
V1_USAGE_DUMP = "v1-usage-dump"
V1_STATS_RESOURCES = "v1-stats-resources"
V1_STATS_USAGE = "v1-stats-usage"
V1_STATS_USAGE_DUMP = "v1-stats-usage-dump"
V1_WEBHOOKS = "v1-webhooks"
V1_CERTIFICATES = "v1-certificates"
V1_BUILDS = "v1-builds"
Expand Down
Loading