Skip to content

Commit

Permalink
impr(server): not saving 503 errors to the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Feb 7, 2024
1 parent f9732af commit a11314f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/middlewares/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a11314f

Please sign in to comment.