Skip to content

chore: regenerate sdk #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-native-appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
"version": "0.7.0",
"version": "0.7.1",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
7 changes: 4 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Client {
'x-sdk-name': 'React Native',
'x-sdk-platform': 'client',
'x-sdk-language': 'reactnative',
'x-sdk-version': '0.7.0',
'x-sdk-version': '0.7.1',
'X-Appwrite-Response-Format': '1.6.0',
};

Expand Down Expand Up @@ -453,6 +453,7 @@ class Client {
try {
let data = null;
const response = await fetch(url.toString(), options);
const text = await response.text()

const warnings = response.headers.get('x-appwrite-warning');
if (warnings) {
Expand All @@ -463,12 +464,12 @@ class Client {
data = await response.json();
} else {
data = {
message: await response.text()
message: text
};
}

if (400 <= response.status) {
throw new AppwriteException(data?.message, response.status, data?.type, data);
throw new AppwriteException(data?.message, response.status, data?.type, text);
}

const cookieFallback = response.headers.get('X-Fallback-Cookies');
Expand Down
Loading