cloudfoundry / cloudfoundry/cf-java-client

Exception handling on "API down for maintenance"

Đang mở
#964 5 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

enhancement triaged
Ngôn ngữ chính
Java
Star
334
Fork
319
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Documented in the case of https://github.com/promregator/promregator/issues/96#issuecomment-490585118, Promregator (a consumer of cf-java-client) encountered the situation that the CF Cloud Controller did not respond with a proper response, but only returned the ASCII string

API down for maintenance

instead of the corresponding JSON.
I stumbled over https://github.com/cloudfoundry/capi-release/releases/tag/1.77.0, where the second line in the highlights suggests that this is a standard behavior of the platform (and also might have reported that error without providing the appropriate HTTP status code of 503).

Based on the logs, it seems that cf-java-client today reacts to just forward an exception of type io.netty.handler.codec.CorruptedFrameException. It is clear that the corresponding request cannot be fulfilled and some sort of error reporting/exception handling must take place in this case.

What is unclear to me is who should be in charge of handling such a kind of exception. I doubt that a consumer application should catch exceptions raised by netty due to a decoding issue. Moreover, the situation appears to be (perhaps not a desired situation, but still) a response that may happen from time to time. One may also argue whether this is covered by the contract.

What is your opinion about all this? Should the consumer of cf-java-client handle this kind of failure by catching io.netty.handler.codec.CorruptedFrameException?

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với issue Promregator được liên kết, CAPI release notes và full-error.txt để hiểu phản hồi bảo trì không phải JSON và CorruptedFrameException phát sinh. Issue không nêu tên tệp hoặc bài kiểm thử nào trong repository; công việc chỉ hoàn tất sau khi dự án quyết định lỗi này thuộc về đâu và xác định cách xử lý exception dự kiến.

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

Đánh giá

Công nghệ
java
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
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
20/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.