diff --git a/functions/http/index.js b/functions/http/index.js index 2cdabb8471..b89fed0c17 100644 --- a/functions/http/index.js +++ b/functions/http/index.js @@ -81,7 +81,7 @@ exports.helloHttp = (req, res) => { handlePUT(req, res); break; default: - res.status(500).send({ error: 'Something blew up!' }); + res.status(405).send({ error: 'Something blew up!' }); break; } }; diff --git a/functions/http/test/index.test.js b/functions/http/test/index.test.js index 30da5d54fe..48ca8b7236 100644 --- a/functions/http/test/index.test.js +++ b/functions/http/test/index.test.js @@ -99,7 +99,7 @@ test.serial(`http:helloHttp: should handle other methods`, (t) => { httpSample.sample.helloHttp(mocks.req, mocks.res); t.true(mocks.res.status.calledOnce); - t.is(mocks.res.status.firstCall.args[0], 500); + t.is(mocks.res.status.firstCall.args[0], 405); t.true(mocks.res.send.calledOnce); t.deepEqual(mocks.res.send.firstCall.args[0], { error: `Something blew up!` }); });