conductor-oss / conductor

Conductor is an event driven orchestration platform
https://conductor-oss.org
Apache License 2.0
18.16k stars 498 forks source link

APIs throwing 500 status when 4** is expected #172

Open pyarun opened 6 months ago

pyarun commented 6 months ago

Describe the bug When trying to delete a non-existing workflow using DELETE {{conductorBaseUrl}}/api/metadata/workflow/:name/:version api replies back with 500 status code.

{
    "status": 500,
    "message": "No such workflow definition: memes_maker version: 2",
    "instance": "1a79daf01f84",
    "retryable": false
}

Details Conductor version: v3.19.0 Persistence implementation: Postgres Queue implementation: Postgres Lock: I guess redis

To Reproduce Steps to reproduce the behavior:

  1. Use API to delete non existing workflow
    curl --location --request DELETE 'http://localhost8080/api/metadata/workflow/memes_maker/2' 
  2. See error

Expected behavior Status code should be 404

Additional context Same thing happens if we try to create existing workflow with existing version.

v1r3n commented 5 months ago

Hi @pyarun are you using postgres as a backend?

pyarun commented 5 months ago

Hi @pyarun are you using postgres as a backend?

yes

prathamjagga commented 4 months ago

In both postgres and redis, NotFoundException is thrown, but in the redis the API gives 4XX error code. need to look what is happening wrong here.

shrimank commented 1 month ago

Same issue I am checking in latest version v3.21.6, expected 404 receiving 500 Http status code

bug