arrowhead-f / arrowhead-f/client-library-python

`process_orchestration` reading response with status code 400 raises exception in `response.read_json()`

Đang mở
#30 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
5
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách lần theo add_orchestration_rule() đến process_orchestration() và kiểm tra cách orchestration_response.read_json() xử lý phản hồi 400 trước khi OrchestrationError được phát sinh. So sánh kiểu phản hồi với constants.Payload.JSON và xác định lý do read_json() phát sinh RuntimeError; hoàn tất khi có thể chẩn đoán lỗi orchestration ban đầu mà không gặp ngoại lệ parsing thứ cấp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.