这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@jstawski

Description

@jstawski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    possible bugBug was reported but is not confirmed or is unable to be replicated.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions