From 881158fc826d0efc033ff0d561b96e35a672b5e9 Mon Sep 17 00:00:00 2001 From: ahsrah7 Date: Sat, 19 Oct 2024 11:10:28 +0530 Subject: [PATCH] error message and status code updated --- controllers/extensionRequests.js | 2 +- test/integration/extensionRequests.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/extensionRequests.js b/controllers/extensionRequests.js index ae9c39dc73..50940acc66 100644 --- a/controllers/extensionRequests.js +++ b/controllers/extensionRequests.js @@ -216,7 +216,7 @@ const updateExtensionRequest = async (req, res) => { (extensionRequest.extensionRequestData.status === EXTENSION_REQUEST_STATUS.APPROVED || extensionRequest.extensionRequestData.status === EXTENSION_REQUEST_STATUS.DENIED) ) { - return res.boom.badRequest("Extension Request cannot be updated"); + return res.boom.badRequest("Only pending extension request can be updated"); } if (req.body.assignee) { diff --git a/test/integration/extensionRequests.test.js b/test/integration/extensionRequests.test.js index 2305df5c8f..29a5ad255f 100644 --- a/test/integration/extensionRequests.test.js +++ b/test/integration/extensionRequests.test.js @@ -967,7 +967,7 @@ describe("Extension Requests", function () { if (err) { return done(err); } - expect(res).to.have.status(200); + expect(res).to.have.status(204); return done(); }); });