[BUG] Should Return 404 when deleting a non-existing variable or chatflow
Describe the bug I am currently writing a implementation for the Flowise API and the endpoints in my Flowise application always return status code 200 when passing a valid Bearer Token for requests I would expect a 404 or something similar.
When passing no Auth Token the API returns an expected 401 for those resources.
This is consistent with curl requests as well as other tools and different instances.
For example: Deleting a non-existing variable or chatflow
To Reproduce Steps to reproduce the behavior:
- Create a valid Auth Token
- Try to delete a non-existing variable
Expected behavior
The endpoint returns a 404 for the request.
Screenshots
Setup
- Installation [docker]
- Flowise Version [2.1.0]
- OS: [Linux]
- CORS-Origins: *
Additional context Add any other context about the problem here.
Yes i agree we should return 404 when chatflow/tool/agent doesnt exists. For now you can have additional check of the response affected to see how many got deleted