Return error for primary keys with a length greater than 512 bytes

This commit is contained in:
F. Levi 2024-09-09 15:27:47 +03:00
parent db0cf3b2ed
commit dcb61f8b3a
2 changed files with 4 additions and 1 deletions

View file

@ -106,7 +106,8 @@ pub enum UserError {
#[error(
"Document identifier `{}` is invalid. \
A document identifier can be of type integer or string, \
only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_).", .document_id.to_string()
only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_), \
and can not be more than 512 bytes.", .document_id.to_string()
)]
InvalidDocumentId { document_id: Value },
#[error("Invalid facet distribution, {}", format_invalid_filter_distribution(.invalid_facets_name, .valid_facets_name))]