Back

Node .updateDocument() appending `/` in request

  • 0
  • Self Hosted
  • Databases
  • Web
RedLeeder
11 Jan, 2024, 16:45

Appwrite Node Version: ^13.0.1

I have come across this really strange behavior regarding an updateDocument call where is will append a forward slash to the end of the request resulting in a AppwriteException: The requested route was not found. error.

The frustrating part is it does not do this every time and I can't seem to track down the cause.

Appwrite Call

TypeScript
await DatabaseAPI.db.updateDocument(
  "games",
  "miniSolves",
  userSolve?.$id ?? "",
  {
    solved: solve.solved,
    time: solve.time,
    solve: solve.solve,
  }
);

Request Request URL: https://blah/v1/databases/games/collections/miniSolves/documents/ Request Method: PATCH Status Code: 404 Not Found

The proper request url should not include the trailing /

Appreciate any help in tracking down this issue ❤️

TL;DR
Title: Node .updateDocument() appending '/' in request; getting a 'Not Found' error The developer is experiencing a strange issue with the updateDocument() function in Appwrite Node. Sometimes, it appends a '/' at the end of the request URL, leading to a 'The requested route was not found' error. The problem is inconsistent, making it difficult to find the cause. Solution: There is no known solution provided in the support thread.
RedLeeder
11 Jan, 2024, 16:46

Node .updateDocument() appending / in request

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