From a11314f11cac6ba80608986940b5a985e2eff826 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 7 Feb 2024 09:50:43 +0100 Subject: [PATCH] impr(server): not saving 503 errors to the database --- backend/src/middlewares/error.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/middlewares/error.ts b/backend/src/middlewares/error.ts index 727d8fe1b..dcc033a70 100644 --- a/backend/src/middlewares/error.ts +++ b/backend/src/middlewares/error.ts @@ -43,7 +43,11 @@ async function errorHandlingMiddleware( recordClientErrorByVersion(req.headers["x-client-version"] as string); } - if (!isDevEnvironment() && monkeyResponse.status >= 500) { + if ( + !isDevEnvironment() && + monkeyResponse.status >= 500 && + monkeyResponse.status !== 503 + ) { const { uid, errorId } = monkeyResponse.data; try {