diff --git a/services/web/app/src/Features/Errors/ErrorController.js b/services/web/app/src/Features/Errors/ErrorController.js index 989d76861d..4b4bc9a5dd 100644 --- a/services/web/app/src/Features/Errors/ErrorController.js +++ b/services/web/app/src/Features/Errors/ErrorController.js @@ -100,6 +100,12 @@ function handleApiError(err, req, res, next) { ) { req.logger.setLevel('warn') res.sendStatus(400) + } else if (err instanceof Errors.TooManyRequestsError) { + req.logger.setLevel('warn') + res.sendStatus(429) + } else if (err instanceof Errors.ForbiddenError) { + req.logger.setLevel('warn') + res.sendStatus(403) } else { req.logger.setLevel('error') res.sendStatus(500)