fix existing var name

This commit is contained in:
Simon Martín
2018-03-01 15:50:20 +01:00
parent 335d91b42d
commit 67b2343571
+3 -3
View File
@@ -49,9 +49,9 @@ function rateLimitFn(userLimitsApi, endpointGroup = null) {
});
if (isBlocked) {
const err = new Error('You are over the limits.');
err.http_status = 429;
return next(err);
const rateLimitError = new Error('You are over the limits.');
rateLimitError.http_status = 429;
return next(rateLimitError);
}
return next();