Description
This is to track BE API update request on Search
It should be better structured for UI as UI cannot have validations for all possible scenarios.
example below
1. When Bucket name is passed wrong from UI
"error": "rest_create_index: error creating index: highlight, err: manager_api: CreateIndex, Prepare failed, err: collection_utils: collection: 'airline1' doesn't belong to scope: 'inventory' in bucket: 'travel-sample'",
2. When request body is for Vector index, but CB version yet not support it.
"error": "rest_auth: preparePerms, err: unmarshalerDecoder: field mapping contains invalid keys: [similarity vector_index_optimized_for dims], error found in #10 byte of ...|xt\"}]}}}}}|..., bigger context ...|ue,\"name\":\"text\",\"store\":true,\"type\":\"text\"}]}}}}}|...",
It would be helpful if we return user-readable messages for UI to display
RESPONSE
{ "error": "rest_auth: preparePerms, err: unmarshalerDecoder: field mapping contains invalid keys: [similarity vector_index_optimized_for dims], error found in #10 byte of ...|xt\"}]}}}}}|..., bigger context ...|ue,\"name\":\"text\",\"store\":true,\"type\":\"text\"}]}}}}}|...",
"request": {
"name": "pdf_search",
"params": {
"doc_config":
,
"mapping": {
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"default_field": "_all",
"default_mapping":
,
"default_type": "_default",
"docvalues_dynamic": false,
"index_dynamic": true,
"store_dynamic": false,
"type_field": "_type",
"types": {
"inventory.airline123": {
"dynamic": true,
"enabled": true,
"properties": {
"embedding": {
"dynamic": false,
"enabled": true,
"fields": [
]
},
"text": {
"dynamic": false,
"enabled": true,
"fields": [
]
}
}
}
}
},
"store":
},
"planParams":
,
"sourceName": "travel-sample",
"sourceParams": {},
"sourceType": "couchbase",
"type": "fulltext-index"
},
"status": "fail"
}
Attachments
Issue Links
- is duplicated by
-
MB-62643 Search API response on error should be structured for UI to display
- Closed