[GH-ISSUE #4334] [BUG]: GET /api/v1/documents/folder/{folderName} is returning a 500 instead of 404 #2759

Closed
opened 2026-02-22 18:31:07 -05:00 by yindo · 1 comment
Owner

Originally created by @jstawski on GitHub (Aug 27, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4334

How are you running AnythingLLM?

Docker (remote machine)

What happened?

As the title suggests, when calling the GET /api/v1/documents/folder/{folderName} with a folder that doesn't exists, the api returns a 500 instead of a 404. If I use an existing folder it returns a 200 as expected. Returning a 500 for a folder not found, makes it hard to distinguish it between an actual server error and a not found.

Are there known steps to reproduce?

Call the api with a folderName that doesn't exist

Originally created by @jstawski on GitHub (Aug 27, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4334 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? As the title suggests, when calling the GET /api/v1/documents/folder/{folderName} with a folder that doesn't exists, the api returns a 500 instead of a 404. If I use an existing folder it returns a 200 as expected. Returning a 500 for a folder not found, makes it hard to distinguish it between an actual server error and a not found. ### Are there known steps to reproduce? Call the api with a folderName that doesn't exist
yindo added the possible bug label 2026-02-22 18:31:07 -05:00
yindo closed this issue 2026-02-22 18:31:07 -05:00
Author
Owner

@jstawski commented on GitHub (Aug 28, 2025):

Never mind, I just realized you return a message in the body. I would have taken a more restful approach

@jstawski commented on GitHub (Aug 28, 2025): Never mind, I just realized you return a message in the body. I would have taken a more restful approach
yindo changed title from [BUG]: GET /api/v1/documents/folder/{folderName} is returning a 500 instead of 404 to [GH-ISSUE #4334] [BUG]: GET /api/v1/documents/folder/{folderName} is returning a 500 instead of 404 2026-06-05 14:48:24 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2759