This article outlines error messages that might be issued when calling the Translation Content API.
This error might occur when calling the GetContent
endpoint with an ID that doesn't exist in the system.
How to solve: Check the ID of the Content entity and ensure it is correct.
This error might occur when the Content entity provided in the Create
or Update
flow violates one of the restrictions,
or didn't pass one (or more) of the validation rules we have in place.
- Error: "Content too large, must be under 1M."
- Rule:
ContentSizeValidationRule
- When it occurs: When the serialized size of the content exceeds 1MB (1,048,576 bytes).
- How to solve: Reduce the size of the content by removing unnecessary data.
- Error: "Field ID not found in the schema."
- Rule:
SchemaFieldsExistValidationRule
- When it occurs: When a field in the content doesn't exist in the associated schema.
- How to solve: Ensure all fields in the content match the schema definition. Remove or rename fields that don't exist in the schema.
Alternatively, update the schema to reflect the desired fields.
- Error: "Actual field type is not `<expected_type>` as expected."
- Rule:
FieldTypeValidationRule
- When it occurs: When the content field type doesn't match the field type defined in the schema.
- How to solve: Change the content field type to match the schema field type.
- Error: "Repeated field ID is not proper."
- Rule:
RepeaterIdSpecifiedValidationRule
- When it occurs: When a repeater field ID is missing or doesn't follow the correct format.
- How to solve: Ensure that repeater field IDs are properly specified and follow the required format.
- Error: "Maximum character value exceeded."
- Rule:
MaxLengthValidationRule
- When it occurs: When a text field exceeds the maximum length specified in the schema.
- How to solve: Shorten the text to fit within the maximum length constraint.
- Error: "Minimum character value not reached."
- Rule:
MinLengthValidationRule
- When it occurs: When a text field is shorter than the minimum length specified in the schema.
- How to solve: Extend or pad the text to meet the minimum length requirement.
- Error: "Field value format not supported."
- Rule:
FieldFormatValidationRule
- When it occurs: When a field value doesn't match one of the specified formats such as email, phone number, or URL.
- How to solve: Change the field value to match the required format as specified in the schema.
- Error: "Schema was not found."
- Rule:
SchemaExistsValidationRule
- When it occurs: When the schema associated with the content doesn't exist.
- How to solve: Ensure the schema ID is correct and valid.
- Error: "Field mask contains unknown fields."
- Rule:
FieldMaskPathsExistValidationRule
- When it occurs: When the field mask contains paths that don't exist in the schema.
- How to solve: Ensure all paths in the field mask correspond to existing fields in the schema.
- Error: "Must pass
locale
and entityId
, or id
."
- Rule:
EitherIdOrEntityIdExistsValidationRule
- When it occurs: When ID isn't found, or when entityId and locale aren't found.
- How to solve: Pass either
id
, or entityId
along with locale
in the request.
If you encounter any of these errors:
- Double-check your content against the schema definition.
- Ensure all required fields are present and correctly formatted.
- Verify that field values meet the constraints specified in the schema such as length, format, or type.
- For update operations, make sure your field masks are correctly specified.