Skip to content

🐛 Bug Report: Rest API request to List Documents returns 400 (Bad Request) if X-Appwrite-Response-Format is not set #7774

@feschaffa

Description

@feschaffa

👟 Reproduction steps

I recently updated to Appwrite 1.5.1. I have a browser extension that needs to use the fetch API on Chrome (I'm not able to use the web SDK there). Until Appwrite 1.4.13, I could make requests to the REST API by setting just the X-Appwrite-Project header. After the update, the extension broke, always returning error 400 (Bad Request) when using the "List Documents" endpoint, with no error message.

After some tinkering and analyzing how the official SDK made the requests, I got it to work by setting the X-Appwrite-Response-Format to "1.4.0". However, that header is marked as "optional" in the documentation.
If this is now required, I suggest pointing that out in the documentation.

Thank you! Nice update, by the way 😉

👍 Expected behavior

As per the documentation, the only required headers for Rest API are "X-Appwrite-Project" and "Content-Type".

👎 Actual Behavior

Error 400 (Bad Request) with no error message when not including the "X-Appwrite-Response-Format" header.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Appwrite 1.5.1
Fetch API (chrome extension)
Rest API

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingproduct / databasesFixes and upgrades for the Appwrite Database.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions