Skip to content

Commit 8067f61

Browse files
committed
fix: headers accessor
1 parent 1c345bc commit 8067f61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/node/src/client.ts.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Client {
268268

269269
const response = await fetch(uri, options);
270270

271-
const latestFormat = responseType.headers.get('x-appwrite-default-response-format');
271+
const latestFormat = response.headers.get('x-appwrite-default-response-format');
272272
const sentFormat = headers['x-appwrite-response-format'];
273273
if (defaultFormat && sentFormat && greaterThan(sentFormat, defaultFormat)) {
274274
console.warn(`Request made with SDK version {{ sdk.version }} using response format ${sentFormat} while the server latest is ${defaultFormat}. This may lead to unexpected behavior. Please downgrade your SDK version to match the server default, see {{ sdk.gitURL }}/releases`);

0 commit comments

Comments
 (0)