protected abstract ProgressEvent handleRequest()

in aws-amplifyuibuilder-component/src/main/java/software/amazon/amplifyuibuilder/component/BaseHandlerStd.java [39:70]


  protected abstract ProgressEvent<ResourceModel, CallbackContext> handleRequest(
      final AmazonWebServicesClientProxy proxy,
      final ResourceHandlerRequest<ResourceModel> request,
      final CallbackContext callbackContext,
      final ProxyClient<AmplifyUiBuilderClient> proxyClient,
      final Logger logger
  );

  protected CreateComponentResponse createComponent(
      CreateComponentRequest request,
      ProxyClient<AmplifyUiBuilderClient> client
  ) {
    try {
      return client.injectCredentialsAndInvokeV2(
          request,
          client.client()::createComponent
      );
    } catch (ResourceNotFoundException e) {
      throw new CfnNotFoundException(ResourceModel.TYPE_NAME, e.getMessage());
    } catch (InternalServerException e) {
      throw new CfnInternalFailureException(e);
    } catch (InvalidParameterException e) {
      throw new CfnInvalidRequestException(e.getMessage(), e);
    } catch (final AmplifyUiBuilderException e) {
      if (e.statusCode() == HttpStatus.SC_NOT_FOUND || e.statusCode() == HttpStatus.SC_BAD_REQUEST) {
        throw new CfnNotFoundException(ResourceModel.TYPE_NAME, e.getMessage());
      }
      throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME, e);
    } catch (final AwsServiceException e) {
      throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME, e);
    }
  }