From d43a2fa1ba739f32f074e842a2102adaa5e0a4da Mon Sep 17 00:00:00 2001 From: Maksim Sitnikov Date: Fri, 15 Dec 2023 14:47:39 +0300 Subject: [PATCH] Change readonly response status to 451 (#43) --- src/components/middlewares/check-read-only-mode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/middlewares/check-read-only-mode.ts b/src/components/middlewares/check-read-only-mode.ts index 780d24b8..21176621 100644 --- a/src/components/middlewares/check-read-only-mode.ts +++ b/src/components/middlewares/check-read-only-mode.ts @@ -7,7 +7,7 @@ export const checkReadOnlyMode = (req: Request, res: Response, next: NextFunctio if (readOnlyMode && req.routeInfo.write) { req.ctx.logError(US_ERRORS.READ_ONLY_MODE_ENABLED); - res.status(503).send({code: US_ERRORS.READ_ONLY_MODE_ENABLED}); + res.status(451).send({code: US_ERRORS.READ_ONLY_MODE_ENABLED}); return; }