static void handleBatchExceptions()

in aws-batch-schedulingpolicy/src/main/java/software/amazon/batch/schedulingpolicy/Exceptions.java [20:31]


    static void handleBatchExceptions(final ResourceHandlerRequest<ResourceModel> request,
            final CallbackContext callbackContext, final BatchException e) {
        if (e.statusCode() == Constants.INVALID_INPUT_STATUS_CODE_400) {
            handleInvalidInputException(request, callbackContext, e);
        } else if (e.statusCode() == Constants.ACCESS_DENIED_STATUS_CODE_403) {
            throw new CfnAccessDeniedException(ResourceModel.TYPE_NAME, e);
        } else if (e.statusCode() == Constants.ALREADY_EXISTS_STATUS_CODE_409) {
            throw new CfnAlreadyExistsException(e);
        } else {
            throw new CfnGeneralServiceException(e);
        }
    }