pub enum ValidationError {
InvalidCollectionName(String),
InvalidKeyName(String),
InvalidFieldName(String),
CollectionNameTooLong,
KeyNameTooLong,
PayloadTooLarge,
InvalidJsonDepth,
TooManyKeys,
UnknownProperty(String),
}Expand description
All possible validation failures. Each variant carries enough context to produce a helpful error message for the client.
Variants§
InvalidCollectionName(String)
The collection name contains invalid characters or is a reserved name.
InvalidKeyName(String)
The document key contains invalid characters or is too long.
InvalidFieldName(String)
A field name in a projection, WHERE clause, or join contains invalid characters.
CollectionNameTooLong
The collection name exceeds 64 characters.
KeyNameTooLong
A document key exceeds 256 characters.
PayloadTooLarge
The entire request payload exceeds 10 MB.
InvalidJsonDepth
The JSON object is nested more than 32 levels deep.
TooManyKeys
A single request contains more than 1000 keys.
UnknownProperty(String)
The request payload contains a property that is not recognised for this endpoint.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
Implement Display so ValidationError can be returned as a JSON error message.
impl Display for ValidationError
Implement Display so ValidationError can be returned as a JSON error message.
Source§impl Error for ValidationError
Mark ValidationError as a standard Rust error type.
Required for it to be used with the ? operator in functions returning
Result<_, Box<dyn std::error::Error>>.
impl Error for ValidationError
Mark ValidationError as a standard Rust error type.
Required for it to be used with the ? operator in functions returning
Result<_, Box<dyn std::error::Error>>.
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()