Skip to content
Back

I need help with web hook set up for document update in my database collection.

  • 0
  • Webhooks
Emmanuel </>
3 Jun, 2025, 17:08

I have been getting the error below in my web hook log.

URL: https://webhooks-emmanuel-samuel-agbedejobis-projects.vercel.app/api/kyc-webhook Method: POST Status code: 400 Body: {"error":"Appwrite error","message":"request cannot have request body","code":400,"type":""}

TL;DR
Developers are encountering the error 'request cannot have request body' when setting up webhooks for document updates in a database collection. They suspect the issue is with the request being added to the request. They also mention concerns about sensitive data. The issue could be related to timezone differences. Remember to avoid nesting requests and check all logs for errors. Solution: Review the code snippets provided for assistance and ensure that the request does not contain request body.
Emmanuel </>
3 Jun, 2025, 17:09

I am willing to share a snippet of my code for a look through. Been fighting with this for 20 days now

Kenny
3 Jun, 2025, 17:33

Provide the code, please.

Emmanuel </>
4 Jun, 2025, 08:12
Emmanuel </>
4 Jun, 2025, 08:12
Emmanuel </>
4 Jun, 2025, 08:13

Please see the code snippets for your assistance @Kenny

Emmanuel </>
4 Jun, 2025, 13:32

hello?? anyone here @Moderator please check my request

Kenny
4 Jun, 2025, 13:36

I'll look at it today, but I will say you posted that message at 3 am my time :P So I was very much asleep.

Emmanuel </>
4 Jun, 2025, 13:43

Oh, sorry about that. I didn't factor timezone in, I'm kinda on a edge that is why. Thanks for your help

faye
4 Jun, 2025, 13:45

could you send all your logs? i see you put logging in place, but does any of it come up?

Emmanuel </>
4 Jun, 2025, 13:51

okay, I will trigger another webhook now

Emmanuel </>
4 Jun, 2025, 13:54

Incoming request

Emmanuel </>
4 Jun, 2025, 13:55

Environment variables check: { hasEndpoint: true, hasProjectId: true, hasApiKey: true, hasDatabaseId: true, hasNotificationsId: true, hasKycId: true, hasResendApiKey: true, hasTutorId: true }

ENV Variables

Kenny
4 Jun, 2025, 13:55

Just to verify, this is not realy data?

Emmanuel </>
4 Jun, 2025, 13:55

Error fetching tutor: AppwriteException [Error]: request cannot have request body at Client.call (/var/task/node_modules/node-appwrite/lib/client.js:172:31) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Databases.listDocuments (/var/task/node_modules/node-appwrite/lib/services/databases.js:1638:16) at async module.exports [as handler] (/var/task/api/kyc-webhook.js:82:36) at async r (/opt/rust/nodejs.js:2:14648) at async Server.<anonymous> (/opt/rust/nodejs.js:2:11350) at async Server.<anonymous> (/opt/rust/nodejs.js:16:6960) { code: 400, type: '', response: 'request cannot have request body' }

Emmanuel </>
4 Jun, 2025, 13:55

sorry?

Kenny
4 Jun, 2025, 13:56

I saw bank account number, I just want to make sure this is fake data

Emmanuel </>
4 Jun, 2025, 13:57

lemme redact that part

Emmanuel </>
4 Jun, 2025, 14:00

I think the issue is the request is been added to the request

Emmanuel </>
4 Jun, 2025, 14:00

Appwrite error: { code: 400, message: 'request cannot have request body', type: '' }

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more