docbox_search/typesense/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum TypesenseIndexFactoryError {
5 #[error("missing TYPESENSE_URL env")]
6 MissingUrl,
7
8 #[error("must provide either api_key or api_key_secret_name for search config")]
9 MissingApiKey,
10
11 #[error("failed to create http client")]
12 CreateClient,
13}
14
15#[derive(Debug, Error)]
16pub enum TypesenseSearchError {
17 #[error("missing search result")]
18 MissingSearchResult,
19 #[error("must provide either include_name or include_content")]
20 MissingQueryBy,
21 #[error("failed to create index")]
22 CreateIndex,
23 #[error("failed to get index")]
24 GetIndex,
25 #[error("failed to delete index")]
26 DeleteIndex,
27 #[error("failed to get secret")]
28 GetSecret,
29 #[error("failed to bulk add documents")]
30 BulkAddDocuments,
31 #[error("failed to delete search documents")]
32 DeleteDocuments,
33 #[error("failed to update document")]
34 UpdateDocument,
35 #[error("failed to get document")]
36 GetDocument,
37 #[error("missing root entry to update")]
38 MissingRootEntry,
39 #[error("failed to search index")]
40 SearchIndex,
41}