diff --git a/.github/workflows/staging-build-and-deploy-pr.yml b/.github/workflows/staging-build-and-deploy-pr.yml index 7554dfd644..c94d36ef03 100644 --- a/.github/workflows/staging-build-and-deploy-pr.yml +++ b/.github/workflows/staging-build-and-deploy-pr.yml @@ -133,7 +133,11 @@ jobs: # Delete all the big search indexes that are NOT English (`*-en-*`) pushd lib/search/indexes - ls | grep -v '\-en\-' | xargs rm + echo "BEFORE...." + ls -l + ls | grep -ve '\-en\b' | xargs rm + echo "AFTER...." + ls -l popd # Note! Some day it would be nice to be able to delete diff --git a/middleware/search.js b/middleware/search.js index c2285795d1..37939de906 100644 --- a/middleware/search.js +++ b/middleware/search.js @@ -37,7 +37,7 @@ router.get('/', async function postSearch(req, res, next) { console.error(err) // Only reply if the headers have not been sent and the request was not aborted... if (!res.headersSent && !req.aborted) { - return res.status(400).json([]) + return res.status(400).json({ error: err.toString() }) } } })