Cancel Pipeline API should return error when non cancelable
Problem
In !121359 (comment 1399073922), during a refactoring we discovered that the API REST endpoint POST ':id/pipelines/:pipeline_id/cancel'
should return an error when pipeline is not cancelable, in order to be consistent with other adapters (GraphQL, UI controller, etc.).
Solution
When a pipeline is not cancelable return a 422 Unprocessable Entity
error.
Details
This should be considered a breaking change because of the status code change.
Edited by Fabio Pitino