correct error message in rate limit

This commit is contained in:
Simon Martín 2018-03-23 15:35:06 +01:00
parent 26baaf6081
commit 8c86c2b3f8

View File

@ -36,7 +36,9 @@ function rateLimit(userLimits, endpointGroup = null) {
// retry is floor rounded in seconds by redis-cell
res.set('Retry-After', retry + 1);
const rateLimitError = new Error('You are over the limits.');
const rateLimitError = new Error(
'You are over platform\'s limits. Please contact us to know more details'
);
rateLimitError.http_status = 429;
return next(rateLimitError);
}