arrowhead-f / arrowhead-f/client-library-python
`process_orchestration` reading response with status code 400 raises exception in `response.read_json()`
- Dominant language
- Python
- Stars
- 5
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Carlos Bocanera Gallardo found that when calling `add_orchestration_rule()`, if the response status code is 400 and the `process_orchestration` function raises an `OrchestrationError`, the `orchestration_response.read_json()` method raises a `RuntimeError`, which makes debugging hard.
The reason for raising the `RuntimeError` is that the `orchestration_response` is not a `"JSON"` response, or at least not a `constants.Payload.JSON` response. I am not sure why this is happening at the moment.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing add_orchestration_rule() into process_orchestration() and inspect how orchestration_response.read_json() handles a 400 response before OrchestrationError is raised. Compare the response type with constants.Payload.JSON and determine why read_json() raises RuntimeError; done means the original orchestration failure can be diagnosed without a secondary parsing exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100