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

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

未关闭
#351 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Java
星标
30
派生
48
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。