Uh oh!
There was an error while loading. Please reload this page.
fixed create/delete handler pre execution check - #266
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // TODO: uncomment when ready to implement | ||
| // if (exception instanceof CfnNotFoundException) | ||
| // return ProgressEvent.progress(model, context); | ||
| // throw exception; |
There was a problem hiding this comment.
I tested throwing exceptions here, and they are not bubbled all the way up. The handler ends up returning a status code of FAILED but no exception is thrown.
There was a problem hiding this comment.
The intent is the Handler should return FAILED with a sane/consistent exception message that ends up in Stack Trace. I think there's a separate issue that needs to be fixed for that as it's not working reliably.
There was a problem hiding this comment.
@rjlohan So which of these asserts should I use?
assertThatThrownBy(() -> handler.handleRequest(proxy, request, newCallbackContext(), proxyClient, logger))
.isInstanceOf(CfnAlreadyExistsException.class);or
response = handler.handleRequest(proxy, request, newCallbackContext(), proxyClient, logger);
assertThat(response).isNotNull();
assertThat(response.getStatus()).isEqualTo(OperationStatus.FAILED);
assertThat(response.getErrorCode()).isEqualTo(HandlerErrorCode.AlreadyExists);I've seen plenty of examples of the former but according to your suggestion we should use the latter?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue #, if available:#265
Description of changes:
CreateHandlerandDeleteHandlerhave fixed pre execution checks which add on the main call graph - codegen - create/delete handler pre execution check #265By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.