public ProgressEvent handleError()

in aws-wafv2-loggingconfiguration/src/main/java/software/amazon/wafv2/loggingconfiguration/BaseHandlerStd.java [83:112]


  public ProgressEvent<ResourceModel, CallbackContext> handleError(final Wafv2Request request,
          final Exception e,
          final ProxyClient<Wafv2Client> proxyClient,
          final ResourceModel resourceModel,
          final CallbackContext callbackContext) {

      BaseHandlerException ex;

      // Convert all exceptions to CFN Exceptions so we can get an error code
      if (e instanceof WafLimitsExceededException) {
          ex = new CfnServiceLimitExceededException(e);
      } else if (e instanceof WafNonexistentItemException ) {
          ex = new CfnNotFoundException(e);
      } else if (e instanceof WafInvalidParameterException || e instanceof WafInvalidResourceException ) {
          ex = new CfnInvalidRequestException(e);
      } else if (e instanceof WafInternalErrorException) {
          ex = new CfnServiceInternalErrorException(e);
      } else if (e instanceof WafUnavailableEntityException) {
          ex = new CfnNotStabilizedException(e);
      } else if (e instanceof WafServiceLinkedRoleErrorException) {
          ex = new CfnInvalidCredentialsException(e);
      } else if (e instanceof WafOptimisticLockException || e instanceof WafAssociatedItemException) {
          ex = new CfnResourceConflictException(e);
      } else if (e instanceof WafDuplicateItemException) {
          ex = new CfnAlreadyExistsException(e);
      } else {
          ex = new CfnGeneralServiceException(e);
      }
      return ProgressEvent.failed(resourceModel, callbackContext, ex.getErrorCode(), ex.getMessage());
  }