impr(server): not saving 503 errors to the database

This commit is contained in:
Miodec 2024-02-07 09:50:43 +01:00
parent f9732af192
commit a11314f11c

View file

@ -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 {