I don't understand why is the meaning of this error
In my Appwrite function, when i execute it, i get this error in my try/catch request cannot have request body any idea of the root cause ?
log(`I get this: ${payload.tournamentId}`); // show the expected id
const tournament = await databases.getDocument(
process.env.APPWRITE_DATABASE_ID, // < it's setup in the settings sections
"tournaments",
payload.tournamentId // < it's exist in my collection "tournaments"
);
// 🔥 Crash here "responseBody": "{\"success\":false,\"message\":\"request cannot have request body\"}",
log(`I didn't get this: ${tournament}`);
I'm using appwrite cloud
and still very odd that you're seeing this inconsistently
I'm self hosting and not on cloud, so I don't think I can help with this. Sorry!
i have try to create another function with another id / name to be sure i have no cash issue
cache*
i try to debug it by doing lot of strange stuff
Error: request cannot have request body
at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:170:31)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Databases.getDocument (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/databases.js:1704:16)
at async Module.default (file:///usr/local/server/src/function/src/main.js:30:24)
at async execute (/usr/local/server/src/server.js:208:16)
at async action (/usr/local/server/src/server.js:225:7)
at async /usr/local/server/src/server.js:14:5
with those paths you're on the 12.0.1 SDK or earlier, I wonder if there's an incompatibility with the new network changes for cloud: https://appwrite.io/docs/products/network
here's the call code, you can see where it's not setting a body on a get request but the header is still included: https://github.com/appwrite/sdk-for-node/blob/12.0.1/lib/client.js#L154
I have update all package.json to update version
and yes, i'ts fix the error
interesting! Which version did you bump up to?
I have update all appwrite function to "node-appwrite": "^15.0.1" but before, it's on "^11.1.0" (maybe a little to old xD)
I can close
Glad you were able to solve this!
look into appwrite version is not the first thing i have think about, specialy because using the Appwrite CLI to push and deploy my function
So i didn't manage the build of the function
I am getting the same error in appwrite python sdk calling either of storage.list_buckets() or storage.get_bucket(bucket_id='<bucket_id>').
Traceback (most recent call last): File "/images/main.py", line 13, in <module> main() ~~~~^^ File "/images/main.py", line 9, in main result = storage.list_buckets() File "/usr/local/lib/python3.13/site-packages/appwrite/services/storage.py", line 42, in list_buckets return self.client.call('get', api_path, { ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ 'content-type': 'application/json', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ }, api_params) ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/appwrite/client.py", line 137, in call raise AppwriteException(response.text, response.status_code, None, response.text) appwrite.exception.AppwriteException: request cannot have request body
using appwrite==9.0.3
any fixes?
I think the code is throwing an error in the client.call method on the line data={} which is passed to the requests .get
please make a new support request
Maybe like me, update the version of the appwrite that you use
Thanks for the suggestion but appwrite==9.0.3 is the latest version.
Ok i don’t know about python sorry So indeed créate a dedicated issue =\
@rc_william please update your SDK, it's been fixed
Recommended threads
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...
- [FEAT REQ] Bun runtime support
Instead of just Nodejs, it would be helpful to also add support for the Bun runtime which can speed up deployments by a ton.
- [ENHANCEMENT] Use the custom Next.js dep...
Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or mo...