---
canonical: https://amplience.com/developers/docs/dev-tools/cli-tool/troubleshooting/
title: Troubleshooting
description: Troubleshooting common errors reported by the Amplience Dynamic Content CLI tool, including validation errors, bulk action errors, and best practice advice for avoiding them.
audience: Developer
date_published: 2023-04-24
date_modified: 2025-03-19
---

# Troubleshooting

This page details some of the common errors reported by the CLI tool and provides best practice advice to prevent these errors from occurring.

## Common errors

The format of errors is as follows. A request may result in multiple errors:

```
Error: Request failed with status code 400: {"errors":[{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should NOT be longer than 1 characters","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/title"}
```

Some of the common errors are shown below.

| Error code                              | Description                                                                                                                                                                                   |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CONTENT_TYPE_INVALID`                  | This is a [validation error](#validation-errors). Validation errors often also include the error message: `should NOT have more than [X] items` or the error entity: `ContentTypeValidation`. |
| `CONTENT_ITEM_UNABLE_TO_EXECUTE_FACETS` | This is a [bulk action error](#bulk-action-errors). Bulk action errors may also include the error message: `Unable to perform faceting.`                                                      |

### Validation errors

Validation errors can occur when your content is not valid according to the parameters outlined in your schema.

> **Tip: Ignoring schema validation**
> When you use the CLI tool to migrate content items, you can bypass schema validation using flag `–-ignoreSchemaValidation` flag. Note the destination hub must be set to [Ignore schema validation](https://amplience.com/developers/docs/user-guides/basics/dynamic-content/settings/#properties).

When creating content, [validation](https://amplience.com/developers/docs/schema-reference/validation) parameters are defined in the content type schema to limit the inputs of certain fields. In the title property below, we have set the minimum text length to 1 and the maximum text length to 150 characters.

```
    "type": "object",
    "properties": {
        "title": {
            "title": "Title",
            "description": "Used for heading and SEO title tag",
            "type": "string",
            "minLength": 1,
            "maxLength": 150
        }
```

If you changed the `maxLength` of the `title` property to 100 characters, any existing content with titles that exceed that length would no longer be valid. This will include content that you've already exported that was created using an earlier version of this schema.

#### How to check for invalid content items

When running a hub clone or content item copy command, you can specify the `--validate` option. This will validate the content and create the folder structure but not import the content. You can then fix any validation errors and run the command without the `—validate` option.

#### Preventing validation errors

In order to prevent a validation issue from occurring, the best practice is to ensure all the content in your hub follows the parameters outlined in the schema. It is best to do this before attempting to perform a copy or clone action in the CLI tool. Validation errors will usually enable you to identify invalid content. You can then update your schema validation or modify the content so that it passes validation.

For more information about validation parameters, please visit the [validation page](https://amplience.com/developers/docs/schema-reference/validation).

### Validation error examples

Below you'll find an example of a validation error when a clone is run with and without the `--validate` command.

#### Validation error when run with validate option

In the error below, we have received a warning that one of our blogs does not validate under the available schema and may not import correctly. The `--validate` option allows us to identity the content items that do not pass validation.

```
WARNING: Baby blog does not validate under the available schema. It may not import correctly.
[
  {
    "keyword": "maxLength",
    "dataPath": ".title",
    "schemaPath": "#/properties/title/maxLength",
    "params": {
      "limit": 1
    },
    "message": "should NOT be longer than 1 characters"
  }
]
/Users/kojogbede/.amplience/copy-1686576065200/Content/Baby blog.json
/Users/kojogbede/.amplience/copy-1686576065200/Content/Babywear text.json
/Users/kojogbede/.amplience/copy-1686576065200/Content/Babywear image.json
/Users/kojogbede/.amplience/copy-1686576065200/Content/Babywear author.json
/Users/kojogbede/.amplience/copy-1686576065200/Content/Winter banner.json
/Users/kojogbede/.amplience/copy-1686576065200/Content/Summer banner.json
=== Importing to destination... ===
Existing mapping loaded from '/Users/kojogbede/.amplience/clone/hub-6452aa021a8f3574f598716f.json', changes will be saved back to it.
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576065200/Content' for repository 'Content'...
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576065200/Examples' for repository 'Examples'...
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576065200/Slots' for repository 'Slots'...
Done. Validating content...
2 of the items being imported already exist in the mapping. Would you like to update these content items instead of skipping them? (y/n) y
Found 2 dependancy levels in 6 items, 0 referencing a circular dependancy.
Importing 6 content items...
--validate was passed, so no content was imported.
=== Done! ===
```

#### Validation error when run without validate command

The error below shows the output of a clone when some invalid content is encountered and the `--validate` option is not specified. The clone command fails with an error and a validation error is shown.

```
WARNING: Baby blog does not validate under the available schema. It may not import correctly.
[
  {
    "keyword": "maxLength",
    "dataPath": ".title",
    "schemaPath": "#/properties/title/maxLength",
    "params": {
      "limit": 1
    },
    "message": "should NOT be longer than 1 characters"
  }
]
/Users/kojogbede/.amplience/copy-1686576382735/Content/Baby blog.json
/Users/kojogbede/.amplience/copy-1686576382735/Content/Babywear text.json
/Users/kojogbede/.amplience/copy-1686576382735/Content/Babywear image.json
/Users/kojogbede/.amplience/copy-1686576382735/Content/Babywear author.json
/Users/kojogbede/.amplience/copy-1686576382735/Content/Winter banner.json
/Users/kojogbede/.amplience/copy-1686576382735/Content/Summer banner.json
=== Importing to destination... ===
Existing mapping loaded from '/Users/kojogbede/.amplience/clone/hub-6452aa021a8f3574f598716f.json', changes will be saved back to it.
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576382735/Content' for repository 'Content'...
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576382735/Examples' for repository 'Examples'...
Scanning structure and content in '/Users/kojogbede/.amplience/copy-1686576382735/Slots' for repository 'Slots'...
Done. Validating content...
2 of the items being imported already exist in the mapping. Would you like to update these content items instead of skipping them? (y/n) y
Found 2 dependancy levels in 6 items, 0 referencing a circular dependancy.
Importing 6 content items...
ERROR: Failed creating Baby blog:
Error: Request failed with status code 400: {"errors":[{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should NOT be longer than 1 characters","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/title"},{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should be <= 5","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/ranking"},{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should NOT be longer than 2 characters","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/description"}]}
Importing content item failed, aborting. Error: Error: Request failed with status code 400: {"errors":[{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should NOT be longer than 1 characters","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/title"},{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should be <= 5","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/ranking"},{"level":"ERROR","code":"CONTENT_TYPE_INVALID","message":"should NOT be longer than 2 characters","property":"FATAL","entity":"ContentTypeValidation","invalidValue":"/description"}]}
Step 5 ('content': Clone Content) Failed. Terminating.

To continue the clone from this point, use the option:
--step content

```

> **Note:** The `--force` option is particularly useful if you are combining multiple commands into scripts that you want to run unattended. This option will ignore any warnings and not wait for any prompts so the script can run without any user input. It is recommended that you use `--validate` to identify any problems before running scripts that use the `--force` option.

## Bulk action errors

Another kind of error you may encounter could be a bulk action error. These kinds of errors occur when the task you're trying to perform includes actions on too many pieces of content.

#### Preventing bulk action errors

A solution to bulk action errors would be to break down your processes into smaller tasks so as to not overload the CLI tool's capability.

### Bulk action error examples

Bulk action errors usually include the code `"CONTENT_ITEM_UNABLE_TO_EXECUTE_FACETS` which indicates the ClI tool's inability to deal with a large amount of content. Similar to validation errors, these errors may also have a status code of `400`.

```
{
  "data": {
    "errors": [
      {
        "level": "ERROR",
        "code": "CONTENT_ITEM_UNABLE_TO_EXECUTE_FACETS",
        "message": "Unable to perform faceting."
      }
    ]
  },
  "status": 400
}
```

## Related pages

[Dynamic Content CLI tool on GitHub](https://github.com/amplience/dc-cli)
