Skip to content

Commit 363e212

Browse files
committed
add warning
1 parent ddc8c70 commit 363e212

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

org-code-javabuilder/lib/src/main/java/org/code/javabuilder/LambdaRequestHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ private void verifyApiClient(String connectionId) {
385385
this.apiClient.getConnection(connectionRequest);
386386
} catch (IllegalStateException e) {
387387
// This can occur if the api client has been shut down, which we have seen happen on occasion.
388-
// Recreate the api client in this case.
388+
// Recreate the api client in this case. Log a warning so we can track when this happens.
389+
Logger.getLogger(MAIN_LOGGER)
390+
.warning(
391+
"Received illegal state exception when trying to talk to API Gateway. Recreating api client.");
389392
this.apiClient =
390393
AmazonApiGatewayManagementApiClientBuilder.standard()
391394
.withEndpointConfiguration(

0 commit comments

Comments
 (0)