protected DeleteComponentResponse deleteComponent()

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


    protected DeleteComponentResponse deleteComponent (
        DeleteComponentRequest request,
        ProxyClient < AmplifyUiBuilderClient > client
  ){
      DeleteComponentResponse deleteResponse;
      try {
        deleteResponse = client.injectCredentialsAndInvokeV2(
            request,
            client.client()::deleteComponent
        );
        return deleteResponse;
      } catch (ResourceNotFoundException e) {
        throw new CfnNotFoundException(ResourceModel.TYPE_NAME, request.id());
      } 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);
      }
    }