Enum elastic_responses::error::ApiError
[−]
pub enum ApiError { IndexNotFound { index: String, }, DocumentMissing { index: String, }, IndexAlreadyExists { index: String, }, Parsing { line: u64, col: u64, reason: String, }, MapperParsing { reason: String, }, ActionRequestValidation { reason: String, }, Other(Map<String, Value>), // some variants omitted }
A REST API error response.
Variants
IndexNotFound
An index wasn't found.
Some endpoints, like search, will return an IndexNotFound
error if a request is made to a missing index.
Other endpoints will return a successful response even if the index is missing but include some error property in the response body.
Fields of IndexNotFound
index: String |
DocumentMissing
A document wasn't found.
This error can occur when attempting to update a document that doesn't already exist.
Fields of DocumentMissing
index: String |
IndexAlreadyExists
An index already exists but was expected to.
Attempting to create an index with a name that's already in use will result in an IndexAlreadyExists
error.
Fields of IndexAlreadyExists
index: String |
Parsing
The request body contains invalid data.
If a Query DSL query contains invalid JSON or unrecognised properties then Elasticsearch will return a Parsing
error.
Fields of Parsing
line: u64 | |
col: u64 | |
reason: String |
MapperParsing
The document mapping contains invalid data.
If a put mapping request contains invalid JSON or unrecognised properties then Elasticsearch will return a MapperParsing
error.
Fields of MapperParsing
reason: String |
ActionRequestValidation
The request body can't be processed.
Some endpoints that expect certain constraints of a request to hold will return an ActionRequestValidation
error if those constraints aren't met.
Fields of ActionRequestValidation
reason: String |
Other(Map<String, Value>)
A currently unrecognised error occurred.
WARNING: Don't rely on this variant to capture an error.
As new variants are introduced they will no longer be matched by ApiError::Other
.
For this reason, this variant will disappear in the future.
Trait Implementations
impl Debug for ApiError
[src]
impl PartialEq for ApiError
[src]
fn eq(&self, __arg_0: &ApiError) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ApiError) -> bool
[src]
This method tests for !=
.
impl Display for ApiError
impl Error for ApiError
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl<'de> Deserialize<'de> for ApiError
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more