Skip to content

Commit 52114e3

Browse files
author
RJ Lohan
authored
Removing large errors from logs and stack events (#250)
* Removing large errors from logs and stack events
1 parent 10e32d7 commit 52114e3

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/main/java/software/amazon/cloudformation/LambdaWrapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,7 @@ private boolean scheduleReinvocation(final HandlerRequest<ResourceT, CallbackT>
563563
int callbackDelayMinutes = Math.abs(handlerResponse.getCallbackDelaySeconds() / 60);
564564
this.scheduler.rescheduleAfterMinutes(context.getInvokedFunctionArn(), callbackDelayMinutes, request);
565565
} catch (final Throwable e) {
566-
this.log(String.format("Failed to schedule re-invoke, caused by %s", e.toString()));
567-
handlerResponse.setMessage(e.getMessage());
566+
handlerResponse.setMessage("Failed to schedule re-invoke.");
568567
handlerResponse.setStatus(OperationStatus.FAILED);
569568
handlerResponse.setErrorCode(HandlerErrorCode.InternalFailure);
570569
}

src/test/java/software/amazon/cloudformation/LambdaWrapperTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ private void verifyHandlerResponse(final OutputStream out, final HandlerResponse
158158

159159
assertThat(handlerResponse.getBearerToken()).isEqualTo(expected.getBearerToken());
160160
assertThat(handlerResponse.getErrorCode()).isEqualTo(expected.getErrorCode());
161-
assertThat(handlerResponse.getMessage()).isEqualTo(expected.getMessage());
162161
assertThat(handlerResponse.getNextToken()).isEqualTo(expected.getNextToken());
163162
assertThat(handlerResponse.getOperationStatus()).isEqualTo(expected.getOperationStatus());
164163
assertThat(handlerResponse.getStabilizationData()).isEqualTo(expected.getStabilizationData());

0 commit comments

Comments
 (0)