Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-10-06 11:54:08 +02:00
parent f3463b176b
commit 2d3a5f09ab
18 changed files with 47 additions and 32 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ export async function createRouter(
try {
const resultSet = await engine?.query(query, { token });
res.send(filterResultSet(toSearchResults(resultSet)));
res.json(filterResultSet(toSearchResults(resultSet)));
} catch (error) {
if (error.name === 'MissingIndexError') {
// re-throw and let the default error handler middleware captures it and serializes it with the right response code on the standard form