Steps to reproduce:
- Deploy a process containing an external task with topic name "foo"
- Start an instance of that process
- Fetch and lock the external task
POST /external-task/fetchAndLock { "workerId": "abc", "maxTasks": 2, "topics": [ { "topicName": "foo", "lockDuration": 100000 } ] }
- Submit a failure
POST /external-task/<external-task-id>/failure { "workerId": "abc", "errorMessage": "Does not compute", "errorDetails": "{\"foo\":\"bar\"}", "retries": 0, "retryTimeout": 60000 }
Expected behavior:
- When opening the incident error details in Cockpit, the error details are shown accordingly.
Observed behavior:
Hints:
- The REST API returns the error details as text/plain
- But AngularJS does a default transformation to JSON: https://docs.angularjs.org/api/ng/service/$http
If the Content-Type is application/json or the response looks like JSON, deserialize it using a JSON parser.