mirror of
https://github.com/typesense/typesense.git
synced 2025-05-28 09:46:05 +08:00
Ensure that http layer returns proper error message during search.
This commit is contained in:
parent
a854fe9858
commit
3c8d9a8aeb
@ -285,12 +285,7 @@ bool get_search(http_req & req, http_res & res) {
|
||||
Option<bool> search_op = CollectionManager::do_search(req.params, results_json_str);
|
||||
|
||||
if(!search_op.ok()) {
|
||||
if(search_op.code() == 404) {
|
||||
res.set_404();
|
||||
} else {
|
||||
res.set(search_op.code(), search_op.error());
|
||||
}
|
||||
|
||||
res.set(search_op.code(), search_op.error());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user