Errors
Error messages and HTTP statuses for Style guide API.
Error envelope
Errors use the standard HTTP API error format.
See HTTP API Overview.
Example:
{
"error": true,
"is_critical": 0,
"message": "Failed to add rule. ...",
"command": "style_guide"
}Error Messages
Error responses include an action-specific prefix followed by the specific error.
Prefixes
addrule
Failed to add rule.
deleterule / deleterules
Failed to delete rule(s).
editrule
Failed to edit rule.
getrules
Failed to get rules.
addcollection
Failed to add collection.
deletecollection
Failed to delete collection.
editcollection
Failed to edit collection.
getcollections
Failed to get collection(s).
addrule errors
addrule errorsRule already exists (same patterns + context_include)
Failed to add rule. Rule with pattern ["p1","p2"] and [no] include context already exists.
400
Missing required parameter
Failed to add rule. Required parameter '{param}' missing.
400
Parameter is empty
Failed to add rule. Parameter '{param}' can't be empty.
400
Forbidden characters
Failed to add rule. Forbidden characters found in '{param}'.
400
Length exceeded
Failed to add rule. Parameter '{param}' exceeds maximum length of {N} characters. Make it shorter and retry.
400
Too many rules (2000 limit)
Failed to add rule. Maximum of 2000 rules reached. Delete unused rules and retry.
400
Recursive suggestion
Failed to add rule. {Field} value can't be identical to the {other field} value or include it in a way that would make the rule match itself.
400
Duplicate value within a parameter
Failed to add rule. Value '{val}' is repeated in '{param}' parameter.
400
Context value is substring of another
Failed to add rule. Parameter '{param}' contains a value that fully includes another. Consider keeping only the more specific one.
400
Collection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
editrule errors
editrule errorsRule not found
Failed to edit rule. Rule not found. Use 'getrules' to check available rules.
404
Missing required parameter
Failed to edit rule. Required parameter '{param}' missing.
400
Parameter is empty
Failed to edit rule. Parameter '{param}' can't be empty.
400
Forbidden characters
Failed to edit rule. Forbidden characters found in '{param}'.
400
Length exceeded
Failed to edit rule. Parameter '{param}' exceeds maximum length of {N} characters. Make it shorter and retry.
400
Recursive suggestion
Failed to edit rule. {Field} value can't be identical to or include the {other field} value.
400
Duplicate value within a parameter
Failed to edit rule. Value '{val}' is repeated in '{param}' parameter.
400
No changes on edit
Failed to edit rule. No changes detected.
400
Context value is substring of another
Failed to edit rule. Parameter '{param}' contains a value that fully includes another. Consider keeping only the more specific one.
400
Collection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
deleterule / deleterules errors
deleterule / deleterules errorsRule(s) not found
Failed to delete rule(s). Rule(s) not found. Use 'getrules' to check available rules.
404
Missing required parameter
Failed to delete rule(s). Required parameter '{param}' missing.
400
Parameter is empty
Failed to delete rule(s). Parameter '{param}' can't be empty.
400
Forbidden characters
Failed to delete rule(s). Forbidden characters found in '{param}'.
400
Length exceeded
Failed to delete rule(s). Parameter '{param}' exceeds maximum length of {N} characters. Make it shorter and retry.
400
Collection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
getrules errors
getrules errorsRule not found
Failed to get rules. Rule not found. Use 'getrules' to check available rules.
404
Missing required parameter
Failed to get rules. Required parameter '{param}' missing.
400
Parameter is empty
Failed to get rules. Parameter '{param}' can't be empty.
400
Forbidden characters
Failed to get rules. Forbidden characters found in '{param}'.
400
Length exceeded
Failed to get rules. Parameter '{param}' exceeds maximum length of {N} characters. Make it shorter and retry.
400
Collection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
addcollection errors
addcollection errorsCollection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
collection parameter is not provided
Required parameter 'collection' missing.
400
Collection already exists
Collection '{collection}' for '{lang}' language(s) already exists (case-insensitive match)
409
Collection limit reached
Failed to add collection. Collection limit of {N} reached (currently {N}). Delete unused collections and retry.
403
deletecollection errors
deletecollection errorsCollection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
collection parameter is not provided
Required parameter 'collection' missing.
400
editcollection errors
editcollection errorsCollection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Old ollection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
collection parameter is not provided
Required parameter 'collection' missing.
400
new_collection parameter is not provided
Required parameter 'new_collection' missing.
400
New collection already exists
Collection '{collection}' for '{lang}' language(s) already exists (case-insensitive match)
409
Edit collection request contains the same old and new collection info
No collection changes detected.
200
getcollections errors
getcollections errorsCollection name size exceeded limit
Collection name exceeds the maximum length of 250 characters.
400
Collection not found
Collection '{collection}' for '{lang}' language(s) not found.
404
Collection name forbidden characters
Collection name contains forbidden characters.
400
Unknown action example
Authorization error
An access key is required for this command. If it's not provided, you will see an error:
See Access key.
Last updated
Was this helpful?

