aws-cloudformation / aws-cloudformation/cloudformation-cli-java-plugin

Exception details are lost when constructor with operation name is used.

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

Mô tả

When the exception is thrown with operation name the original errorMessage is lost.
For example

```
throw new CfnGeneralServiceException("Operation", new RuntimeException("something happend");
```

results in `"Error occurred during operation 'Operation'."` message.

If operation parameter would not be passed

```
throw new CfnGeneralServiceException(new RuntimeException("something happend")
```

then the message would contain `"something happend"`.

There are existing implementation's of resources that rethrow exceptions with operation field set, and the original message is thrown. What is more - if any exception will be unhandled explicitly `CfnInternalFailureException` will be thrown without errorMessage from the original exception and CloudFormation console will just display "Internal failure... " kind of message

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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.