correct error message in rate limit

This commit is contained in:
Simon Martín 2018-03-23 11:42:53 +01:00
parent fb784d6a91
commit 609bf13765

View File

@ -46,7 +46,9 @@ function rateLimit(userLimitsApi, 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.');
let rateLimitError = new Error(
'You are over platform\'s limits. Please contact us to know more details'
);
rateLimitError.http_status = 429;
rateLimitError.type = 'limit';
rateLimitError.subtype = 'rate-limit';