Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wesolowskim opened this issue Feb 12, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@wesolowskim
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants