in aws-amplifyuibuilder-component/src/main/java/software/amazon/amplifyuibuilder/component/BaseHandlerStd.java [127:153]
protected GetComponentResponse getComponent (
GetComponentRequest request,
ProxyClient < AmplifyUiBuilderClient > client
){
GetComponentResponse readResponse;
try {
readResponse =
client.injectCredentialsAndInvokeV2(
request,
client.client()::getComponent
);
} 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);
}
return readResponse;
}