Bug 1791205

Summary: Tasks status update return 500 instead of 409
Product: [Retired] Beaker Reporter: Martin Styk <mastyk>
Component: lab controllerAssignee: Martin Styk <mastyk>
Status: CLOSED NEXTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: high    
Version: developCC: bpeck, cbouchar, jkriz, mastyk
Target Milestone: 27.1Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-15 09:35:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Styk 2020-01-15 08:47:59 UTC
Description of problem:
Beaker API providing a way to change task status (Running, Completed, Aborted).
However, if the task status is confirmed we lock this state from further change.
For example Aborted can not be transferred back to Completed.

Internally we are rising this error but we are not passing this into a client.
Instead of that, we are firing 500 and clients don't know how to handle it.
  

Version-Release number of selected component (if applicable):
26.6


Steps to Reproduce:
1. Run task in Beaker
2. Fire request to API to change the status to Completed (in case current status is running) 
3. Fire another request to API

Actual results:
500, Internal Server Error

Expected results:
409, <Put here cool error message>

Additional info: