Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Should Return 404 when deleting a non-existing variable or chatflow

Open Cyberschorsch opened this issue 1 year ago • 1 comments

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:

  1. Create a valid Auth Token
  2. Try to delete a non-existing variable

Expected behavior

The endpoint returns a 404 for the request.

Screenshots Bildschirmfoto vom 2024-09-19 16-18-38 Bildschirmfoto vom 2024-09-19 16-18-59 Bildschirmfoto vom 2024-09-19 16-26-10

Setup

  • Installation [docker]
  • Flowise Version [2.1.0]
  • OS: [Linux]
  • CORS-Origins: *

Additional context Add any other context about the problem here.

Cyberschorsch avatar Sep 19 '24 14:09 Cyberschorsch

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

HenryHengZJ avatar Sep 19 '24 17:09 HenryHengZJ