diff --git a/src/search.js b/src/search.js index c8f2ec7..9d02f48 100644 --- a/src/search.js +++ b/src/search.js @@ -212,6 +212,7 @@ export default async (req, res) => { searchFile = req.rawBody; } else if (req.method === "HEAD") { await logAndDequeue(knex, redis, uid, priority, 204); + // Note: the client side can not recive the json object because of HEAD return res.status(204).json({ error: "HEAD method acknowledged", }); diff --git a/src/search.test.js b/src/search.test.js index dc7db69..69f138c 100644 --- a/src/search.test.js +++ b/src/search.test.js @@ -612,7 +612,6 @@ describe("invalid input", () => { async () => { const response = await request(app).head("/search"); expect(response.statusCode).toBe(204); - expect(typeof response.body.error).toBe("string"); }, 1000 * 10 );