Uh oh!
There was an error while loading. Please reload this page.
Fix base exception message - #264
Conversation
So this is why this code try {
awsResponse = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::deleteMetricFilter);
} catch (ResourceNotFoundExceptione) {
logger.log("Resource does not exist and could not be deleted.");
thrownewCfnNotFoundException(e);
}causes this to be printed in the handler logs... |
Uh oh!
There was an error while loading. Please reload this page.
| super(ERROR_CODE.getMessage(), ERROR_CODE); | ||
| } | ||
| public CfnInvalidCredentialsException(final Throwable cause) { |
There was a problem hiding this comment.
I don't see any reason to limit all of these exceptions to just having a cause constructor. Can we include a (cause) and a (message, cause) for all of them?
There was a problem hiding this comment.
Good suggestion. However, I'm afraid it will be other large change to add all exception to support this new constructor as well as make the BaseHandlerException correct.
I would prefer to add this new constructor as new feature, but this PR will focus to fix this known bug.
There was a problem hiding this comment.
can we create an issue to resolve this then, if we're not going to include it in this PR?
This reverts commit 599aa56.
Issue #, if available:#243
Description of changes:. Fix the error message issue for BaseHandlerException.
Cloudformation service doesn't like empty message exception, use the cause exception as default exception message.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.