conductor-oss / conductor-oss/conductor

[BUG] Bad response code/body on api for update a task by ref name if invalid workflowId or task ref (update HUMAN TASK)

Open
#783 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
32.2k
Forks
1k
Avg merge
2d 3h
Merged PRs (30d)
37

Description

**Describe the bug**
When i use rest api endoint (/api/tasks/:workflowId/:taskRefName/:status) for update a HUMAN TASK status to "COMPLETED", even if workflowId not exists, even if taskRefName not exists, api response always return an empty response with code 200 ok.

**Details**
Conductor version: v3.21.21
Persistence implementation: Postgres
Queue implementation: Postgres

Workflow definition: any
Task definition:
{
"name": "wait_deployment_status",
"taskReferenceName": "wait_deployment_status",
"inputParameters": {},
"type": "HUMAN",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
}

**To Reproduce**
Steps to reproduce the behavior:
1. Define any workflow using a HUMAN TASK (ex ref : wait_deployment_status)
2. Run workflow (ex: workflowId = dd3afc05-5ad1-4765-92bf-b951df21d79e)

3.1 Call conductor rest api endpoint with a non existing workflowId execution and valid task ref (POST .../api/tasks/bad-workflow-id/wait_deployment_status/COMPLETED) => empty response with code 200 ok

3.2 Call conductor rest api endpoint with workflowId execution and bad ref name (POST .../api/tasks/dd3afc05-5ad1-4765-92bf-b951df21d79e/bad_task_ref/COMPLETED) => empty response with code 200 ok

**Expected behavior**
On calling this endpoint, if workflowId execution doesn't exist or taskRefName doesn't exist in workflowId execution, api endpoint should return an error and a response code 404.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.